Exemple #1
0
 /**
  *
  * @param type $className 
  */
 public static function autoload($className)
 {
     $result = ZendT_Loader::loadFile($className);
     if (!$result) {
         throw new ZendT_Exception(error_get_last());
     }
 }
Exemple #2
0
 /**
  *
  * @param string $name
  * @param array $arguments
  * @return stdClass
  * @throws ZendT_Exception 
  */
 public function __call($name, $arguments)
 {
     if (method_exists($this, $name)) {
         $obj = $this;
     } else {
         foreach ($this->_helperPath as $value) {
             $className = $value . '_' . ucfirst($name);
             if (ZendT_Loader::loadFile($className)) {
                 break;
             } else {
                 $className = null;
             }
         }
         if ($className == null) {
             $obj = null;
         } else {
             $obj = new $className();
         }
     }
     if ($obj == null) {
         throw new ZendT_Exception('Plugin "' . $name . '" not found in "' . implode(',', $this->helperPath) . '" ');
     }
     return call_user_method($name, $obj, $arguments);
 }