Skip to content
This repository has been archived by the owner on Feb 15, 2020. It is now read-only.

Commit

Permalink
- Updated classes in compiler factory
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Feb 5, 2015
1 parent 37c1e34 commit 803bb57
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions src/IPub/Permissions/DI/PermissionsExtension.php
Expand Up @@ -15,24 +15,10 @@
namespace IPub\Permissions\DI;

use Nette;
use Nette\Configurator;
use Nette\DI\Compiler;
use Nette\DI;
use Nette\PhpGenerator as Code;

use IPub;

if (!class_exists('Nette\DI\CompilerExtension')) {
class_alias('Nette\Config\CompilerExtension', 'Nette\DI\CompilerExtension');
class_alias('Nette\Config\Compiler', 'Nette\DI\Compiler');
class_alias('Nette\Config\Helpers', 'Nette\DI\Config\Helpers');
}

if (isset(Nette\Loaders\NetteLoader::getInstance()->renamed['Nette\Configurator']) || !class_exists('Nette\Configurator')) {
unset(Nette\Loaders\NetteLoader::getInstance()->renamed['Nette\Configurator']);
class_alias('Nette\Config\Configurator', 'Nette\Configurator');
}

class PermissionsExtension extends Nette\DI\CompilerExtension
class PermissionsExtension extends DI\CompilerExtension
{
public function loadConfiguration()
{
Expand Down Expand Up @@ -90,7 +76,7 @@ public function beforeCompile()
*/
public static function register(Nette\Configurator $config, $extensionName = 'permissions')
{
$config->onCompile[] = function (Configurator $config, Compiler $compiler) use ($extensionName) {
$config->onCompile[] = function (Nette\Configurator $config, Nette\DI\Compiler $compiler) use ($extensionName) {
$compiler->addExtension($extensionName, new PermissionsExtension());
};
}
Expand Down

0 comments on commit 803bb57

Please sign in to comment.