示例#1
0
 /**
  * Return singleton instance
  *
  * @return ICE_Ext_Loader
  */
 public static final function instance()
 {
     // new instance if necessary
     if (!self::$instance instanceof self) {
         // create singleton instance
         self::$instance = new self();
     }
     return self::$instance;
 }
示例#2
0
 /**
  * Return path to an ext file
  *
  * @param string $filename
  * @return string
  */
 public final function locate_file($filename)
 {
     // loop class ancestry
     foreach ($this->reflect_stack() as $reflection) {
         // call ext loader file locator helper
         $located = ICE_Ext_Loader::instance()->locate_file($reflection->getName(), $filename);
         // anything?
         if ($located) {
             return $located;
         }
     }
     // no file found :(
     return false;
 }