// replace !is_core by substr($classname, -4) != 'Core'
This commit is contained in:
1 parent
cd8dfebaaa
commit
d3c2a56f21
1 file changed
+5
-4
@@ -68,7 +68,7 @@ class Autoload
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrive informations about a class in classes index and load it
|
* Retrieve informations about a class in classes index and load it
|
||||||
*
|
*
|
||||||
* @param string $classname
|
* @param string $classname
|
||||||
*/
|
*/
|
||||||
@@ -78,7 +78,7 @@ class Autoload
|
|||||||
$this->generateIndex();
|
$this->generateIndex();
|
||||||
|
|
||||||
// If $classname has not core suffix (E.g. Shop, Product)
|
// If $classname has not core suffix (E.g. Shop, Product)
|
||||||
if (substr($classname, -4) == 'Core')
|
if (substr($classname, -4) != 'Core')
|
||||||
{
|
{
|
||||||
// If requested class does not exist, load associated core class
|
// If requested class does not exist, load associated core class
|
||||||
if (isset($this->index[$classname]) && !$this->index[$classname])
|
if (isset($this->index[$classname]) && !$this->index[$classname])
|
||||||
@@ -135,9 +135,9 @@ class Autoload
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrive recursively all classes in a directory and its subdirectories
|
* Retrieve recursively all classes in a directory and its subdirectories
|
||||||
*
|
*
|
||||||
* @param unknown_type $path Relativ path from root to the directory
|
* @param string $path Relativ path from root to the directory
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
protected function getClassesFromDir($path)
|
protected function getClassesFromDir($path)
|
||||||
@@ -166,3 +166,4 @@ class Autoload
|
|||||||
return $classes;
|
return $classes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in new issue
Block a user