SHOW:
|
|
- or go back to the newest paste.
| 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 | - | }; |
| 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); |