| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package WPEmerge |
| 4 |
* @author Atanas Angelov <hi@atanas.dev> |
| 5 |
* @copyright 2017-2019 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 WPEmerge\Controllers; |
| 11 |
|
| 12 |
use WPEmerge; |
| 13 |
use WPEmerge\ServiceProviders\ServiceProviderInterface; |
| 14 |
|
| 15 |
/** |
| 16 |
* Provide controller dependencies |
| 17 |
* |
| 18 |
* @codeCoverageIgnore |
| 19 |
*/ |
| 20 |
class ControllersServiceProvider implements ServiceProviderInterface { |
| 21 |
/** |
| 22 |
* {@inheritDoc} |
| 23 |
*/ |
| 24 |
public function register( $container ) { |
| 25 |
$container[ WordPressController::class ] = function ( $c ) { |
| 26 |
return new WordPressController( $c[ WPEMERGE_VIEW_SERVICE_KEY ] ); |
| 27 |
}; |
| 28 |
} |
| 29 |
|
| 30 |
/** |
| 31 |
* {@inheritDoc} |
| 32 |
*/ |
| 33 |
public function bootstrap( $container ) { |
| 34 |
// Nothing to bootstrap. |
| 35 |
} |
| 36 |
} |
| 37 |
|