HosipLan

Untitled

Apr 2nd, 2012
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. // Enable RobotLoader - this will load all classes automatically
  4. $configurator->setTempDirectory(__DIR__ . '/temp');
  5. $robot = $configurator->createRobotLoader()
  6.     ->addDirectory(APP_DIR)
  7.     ->addDirectory(LIBS_DIR);
  8. $robot->register();
  9.  
  10. $configurator->onCompile[] = function ($config, $compiler) use ($robot) {
  11.     $compiler->addExtension(new PresentersRegisterExtension($robot));
  12. };
  13.  
  14. // Create Dependency Injection container from config.neon file
  15. $configurator->addConfig(__DIR__ . '/config/config.neon');
  16. $container = $configurator->createContainer();
  17. $container->addService('robotLoader', $robot);
Advertisement
Add Comment
Please, Sign In to add comment