Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class InjectExtension extends \Nette\DI\CompilerExtension {
- public function beforeCompile(Nette\PhpGenerator\ClassType $class) {
- $builder = $this->getContainerBuilder();
- foreach ($builder->getDefinitions() as $name => $service) {
- if (stripos($name, 'kdyby.') === 0) { continue; } // https://www.youtube.com/watch?v=otCpCn0l4Wo
- $service->setInject(TRUE);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment