| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package WPEmergeAppCore |
| 4 |
* @author Atanas Angelov <hi@atanas.dev> |
| 5 |
* @copyright 2017-2020 Atanas Angelov |
| 6 |
* @license https://www.gnu.org/licenses/gpl-2.0.html GPL-2.0 |
| 7 |
* @link https://wpemerge.com/ |
| 8 |
*/ |
| 9 |
|
| 10 |
namespace WPEmergeAppCore\AppCore; |
| 11 |
|
| 12 |
use WPEmerge\ServiceProviders\ExtendsConfigTrait; |
| 13 |
use WPEmerge\ServiceProviders\ServiceProviderInterface; |
| 14 |
|
| 15 |
/** |
| 16 |
* Provide theme dependencies. |
| 17 |
* |
| 18 |
* @codeCoverageIgnore |
| 19 |
*/ |
| 20 |
class AppCoreServiceProvider implements ServiceProviderInterface { |
| 21 |
use ExtendsConfigTrait; |
| 22 |
|
| 23 |
/** |
| 24 |
* {@inheritDoc} |
| 25 |
*/ |
| 26 |
public function register( $container ) { |
| 27 |
$this->extendConfig( $container, 'app_core', [ |
| 28 |
'path' => '', |
| 29 |
'url' => '', |
| 30 |
] ); |
| 31 |
|
| 32 |
$container['wpemerge_app_core.app_core.app_core'] = function( $c ) { |
| 33 |
return new AppCore( $c[ WPEMERGE_APPLICATION_KEY ] ); |
| 34 |
}; |
| 35 |
|
| 36 |
$app = $container[ WPEMERGE_APPLICATION_KEY ]; |
| 37 |
$app->alias( 'core', 'wpemerge_app_core.app_core.app_core' ); |
| 38 |
} |
| 39 |
|
| 40 |
/** |
| 41 |
* {@inheritDoc} |
| 42 |
*/ |
| 43 |
public function bootstrap( $container ) { |
| 44 |
// Nothing to bootstrap. |
| 45 |
} |
| 46 |
} |
| 47 |
|