public function __construct() { //@todo consider to create FakeContainer class and move all setup there $this->container = new Container(); //@todo move it to common test setup file set_include_path('/home/developer/code/ai/config'); $this->adminUserService = $this->container->resolve('\\Ai\\AdminUserService'); }
<?php /** * Created by PhpStorm. * User: Marcin Wojcik * Date: 1/18/16 * Time: 7:55 PM */ namespace AiAdmin; use Ai\Container; require 'bootstrap.php'; //echo "admin.app.connet.local\n"; //$firstController = new FrontController(); //$firstController->test(); $main = function (FrontController $frontController) { //$frontController->run(); $frontController->run(); }; $container = new Container(); $container->register($container); //container have to be registered $container->callFunction($main); // //$container->register($firstController); //$container->resolve("AiAdmin\\FrontController"); //print_r($container->getObjects());