// little optimization in autoloader, we exclude smarty classes of treatement

This commit is contained in:
aFolletete
2012-05-21 15:18:59 +00:00
parent 6b4d6cb472
commit ebe3addddd
+4
View File
@@ -77,6 +77,10 @@ class Autoload
*/
public function load($classname)
{
// Smarty uses its own autoloader, so we exclude all Smarty classes
if (strpos(strtolower($classname), 'smarty_') === 0)
return;
// regenerate the class index if the requested class is not found in the index or if the requested file doesn't exists
if (!isset($this->index[$classname])
|| ($this->index[$classname] && !is_file($this->root_dir.$this->index[$classname]))