getTrace(); if (isset($trace[2]) && isset($trace[2]['function']) && in_array($trace[2]['function'], array('class_exists', 'interface_exists'))) { return false; } if (isset($trace[1]) && isset($trace[1]['function']) && in_array($trace[1]['function'], array('class_exists', 'interface_exists'))) { return false; } throw $e; } /** * Check if the requested class was loaded from the specified path * * @return bool */ protected static function loadSuccessful($class) { if (!class_exists($class, false) && !interface_exists($class, false)) { return false; } return true; } /** * If possible, update the classmap file with newly-discovered * mapping. * * @param string $class Class name discovered * * @param string $origin File where class was found * */ protected static function updateMap($class, $origin) { if (is_writable(self::$mapfile) || is_writable(dirname(self::$mapfile))) { self::$map[$class] = $origin; file_put_contents(self::$mapfile, '<'."?php\n" . "// PEAR2\Autoload auto-generated classmap\n" . "return " . var_export(self::$map, true) . ';', LOCK_EX ); } } /** * return the array of paths PEAR2 autoload has registered * * @return array */ static function getPaths() { return self::$paths; } } } Autoload::initialize(dirname(__DIR__));