| 1 |
<?php |
| 2 |
namespace Depicter\Front; |
| 3 |
|
| 4 |
|
| 5 |
use WPEmerge\ServiceProviders\ServiceProviderInterface; |
| 6 |
|
| 7 |
/** |
| 8 |
* initialize common services |
| 9 |
*/ |
| 10 |
class ServiceProvider implements ServiceProviderInterface |
| 11 |
{ |
| 12 |
|
| 13 |
/** |
| 14 |
* {@inheritDoc} |
| 15 |
*/ |
| 16 |
public function register( $container ) { |
| 17 |
$app = $container[ WPEMERGE_APPLICATION_KEY ]; |
| 18 |
|
| 19 |
$container[ 'depicter.front.manager' ] = function () { |
| 20 |
return new Front(); |
| 21 |
}; |
| 22 |
$app->alias( 'front', 'depicter.front.manager' ); |
| 23 |
|
| 24 |
$container[ 'depicter.front.document.assets' ] = function () { |
| 25 |
return new Assets(); |
| 26 |
}; |
| 27 |
$container[ 'depicter.front.document.preview' ] = function () { |
| 28 |
return new Preview(); |
| 29 |
}; |
| 30 |
$container[ 'depicter.front.document.render' ] = function () { |
| 31 |
return new Render(); |
| 32 |
}; |
| 33 |
|
| 34 |
$container[ 'depicter.front.symbols' ] = function () { |
| 35 |
return new Symbols(); |
| 36 |
}; |
| 37 |
$app->alias( 'symbolsProvider', 'depicter.front.symbols' ); |
| 38 |
} |
| 39 |
|
| 40 |
/** |
| 41 |
* {@inheritDoc} |
| 42 |
*/ |
| 43 |
public function bootstrap( $container ) { |
| 44 |
\Depicter::front()->bootstrap(); |
| 45 |
} |
| 46 |
|
| 47 |
} |
| 48 |
|