Add magic methods

This commit is contained in:
Barry vd. Heuvel
2014-08-06 13:04:52 +02:00
parent 27ffcb883c
commit 8dcc74a95f
3 changed files with 35 additions and 17 deletions
+2 -7
View File
@@ -40,7 +40,6 @@ class Generator
$this->magic = $this->config->get('laravel-ide-helper::magic');
$this->interfaces = $this->config->get('laravel-ide-helper::interfaces');
$this->helpers = $helpers;
}
/**
@@ -68,7 +67,8 @@ class Generator
// Get all aliases
foreach (AliasLoader::getInstance()->getAliases() as $name => $facade) {
$alias = new Alias($name, $facade, $this->interfaces);
$magicMethods = array_key_exists($name, $this->magic) ? $this->magic[$name] : array();
$alias = new Alias($name, $facade, $magicMethods, $this->interfaces);
if ($alias->isValid()) {
@@ -82,11 +82,6 @@ class Generator
$alias->addClass($this->extra[$name]);
}
//Add extra methods, from other classes (magic static calls)
if (array_key_exists($name, $this->magic)) {
$alias->addClass($this->magic[$name]);
}
$namespace = $alias->getNamespace();
if (!isset($namespaces[$namespace])) {
$namespaces[$namespace] = array();