public static function Autoload($strClassName) { if (!parent::Autoload($strClassName)) { if (file_exists($strFilePath = sprintf('%s/narro/%s.class.php', __NARRO_INCLUDES__, $strClassName))) { require_once $strFilePath; } elseif (file_exists($strFilePath = sprintf('%s/database/%s.class.php', __QCUBED_CORE__, $strClassName))) { require_once $strFilePath; } elseif (file_exists($strFilePath = sprintf('%s/narro/importer/%s.class.php', __NARRO_INCLUDES__, $strClassName))) { require_once $strFilePath; } elseif (file_exists($strFilePath = sprintf('%s/narro/panel/%s.class.php', __NARRO_INCLUDES__, $strClassName))) { require_once $strFilePath; } elseif (file_exists($strFilePath = sprintf('%s/narro/sources/%s.class.php', __NARRO_INCLUDES__, $strClassName))) { require_once $strFilePath; } elseif (file_exists($strFilePath = sprintf('%s/narro/search/%s.class.php', __NARRO_INCLUDES__, $strClassName))) { require_once $strFilePath; } elseif (file_exists($strFilePath = sprintf('%s/model/%s.class.php', __NARRO_INCLUDES__, $strClassName))) { require_once $strFilePath; } elseif (file_exists($strFilePath = sprintf('%s/qcubed_custom_controls/%s.class.php', __NARRO_INCLUDES__, $strClassName))) { require_once $strFilePath; } elseif (file_exists($strFilePath = sprintf('%s/%s.php', __NARRO_INCLUDES__, str_replace('_', '/', $strClassName)))) { require_once $strFilePath; } elseif (file_exists($strFilePath = sprintf('%s/%s/includes/QFirebug/includes/%s.class.php', __DOCROOT__, __SUBDIRECTORY__, $strClassName))) { require_once $strFilePath; } else { throw new Exception(sprintf('Cannot find the file that contains the class "%s"', $strClassName)); } } }
/** * This is called by the PHP5 Autoloader. This method overrides the * one in ApplicationBase. * * @return void */ public static function Autoload($strClassName) { // First use the Qcodo Autoloader if (!parent::Autoload($strClassName)) { // TODO: Run any custom autoloading functionality (if any) here... } }
/** * This is called by the PHP5 Autoloader. This method overrides the * one in ApplicationBase. * * @return void */ public static function Autoload($strClassName) { // First use the Qcodo Autoloader if (!parent::Autoload($strClassName)) { // NOTE: Run any custom autoloading functionality (if any) here... if (file_exists($strFilePath = sprintf('%s/%s.class.php', __DATA_CLASSES__, $strClassName))) { require $strFilePath; return true; } } return false; }
/** * This is called by the PHP5 Autoloader. This method overrides the * one in ApplicationBase. * * @return void */ public static function Autoload($strClassName) { // First use the Qcodo Autoloader if (!parent::Autoload($strClassName)) { // NOTE: Run any custom autoloading functionality (if any) here... if (file_exists($strFilePath = sprintf('%s/%s.class.php', __DATA_CLASSES__, $strClassName))) { require $strFilePath; return true; } else { if (substr($strClassName, 0, 4) == 'Zend') { if (file_exists($strFilePath = sprintf('%s/%s.php', __INCLUDES__, str_replace('\\', '/', $strClassName)))) { require $strFilePath; return true; } } } } return false; }