Exemplo n.º 1
1
Arquivo: Init.php Projeto: dxw/iguana
 public static function init($dir, $namespace)
 {
     $loader = new \Aura\Autoload\Loader();
     $loader->register();
     $loader->addPrefix($namespace, $dir);
     $registrar = \Dxw\Iguana\Registrar::getSingleton();
     $registrar->di($dir . '/di.php', $namespace);
     return $registrar;
 }
Exemplo n.º 2
0
 function h()
 {
     return \Dxw\Iguana\Registrar::getSingleton()->getInstance(\Dxw\Iguana\Theme\Helpers::class);
 }
Exemplo n.º 3
0
 public function testRegisterDoesNotCallUnregisterable()
 {
     $registrar = \Dxw\Iguana\Registrar::getSingleton();
     $registrar->addInstance('MyUnregisterable', new \MyUnregisterable());
     global $called;
     $called = 0;
     $registrar->register();
     $this->assertEquals(0, $called);
 }