Skip to content

Instantly share code, notes, and snippets.

@vojtech-dobes
Created September 4, 2012 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vojtech-dobes/3620535 to your computer and use it in GitHub Desktop.
Save vojtech-dobes/3620535 to your computer and use it in GitHub Desktop.
ExtensionsList, hack for Nette 2.0.0-4 because of https://github.com/nette/nette/pull/720
<?php
$config = __DIR__ . '/config/config.neon';
$configurator->addConfig($config, FALSE);
foreach (Nette\Utils\Arrays::get(Nette\Utils\Neon::decode(
file_get_contents($config)
) ?: array(), 'extensions', array()) as $name => $class) {
$configurator->onCompile[] = function ($configurator, $compiler) use ($name, $class) {
$compiler->addExtension($name, new $class);
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment