function qCal_Autoloader($name) { // Try to load only concerned class... if (strpos($name, 'qCal') === 0) { qCal_Loader::loadClass($name); } }
/** * qCal library loader * * NOTE: qCal expects to be in the include path. As qCal is rearly used, we wait * for its first load request before we register the lib * * @param $name * @throws Zend_Exception */ public static function qCal($class) { $qCalPath = dirname(dirname(__FILE__)) . '/library/qCal/lib/'; require_once "{$qCalPath}/qCal/Loader.php"; $autoloader = Zend_Loader_Autoloader::getInstance(); $autoloader->unregisterNamespace('qCal'); $autoloader->pushAutoloader(array('qCal_Loader', 'loadClass'), 'qCal'); qCal_Loader::loadClass($class); }
function qCal_Autoloader($name) { qCal_Loader::loadClass($name); }