Horde_Autoloader_Default::__construct PHP Method

__construct() public method

public __construct ( )
    public function __construct()
    {
        $paths = array_map('realpath', array_diff(array_unique(explode(PATH_SEPARATOR, get_include_path())), array('.')));
        foreach (array_reverse($paths) as $path) {
            $this->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Default($path));
        }
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $key = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '';
     $key .= '|' . __FILE__;
     $this->_cachekey = self::PREFIX . '_' . hash('md5', $key);
     $this->_storage = new Horde_Autoloader_Cache_Bootstrap();
     $data = $this->_storage->get($this->_cachekey);
     if ($data === false) {
         $this->_newkey = true;
     } else {
         $this->_cache = $data;
     }
     register_shutdown_function(array($this, 'shutdown'));
 }
Horde_Autoloader_Default