Exemple #1
0
 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');
 }
Exemple #2
0
<?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());