示例#1
0
 public static function import($key)
 {
     $path = ZtPath::getInstance();
     $filePath = $path->getPath($key);
     if ($filePath) {
         return require_once $filePath;
     }
     return false;
 }
示例#2
0
 /**
  * 
  * @param string $className
  */
 public static function autoloadZtPsr2($className)
 {
     if (substr($className, 0, 1) != 'J') {
         $path = ZtPath::getInstance();
         $filePath = $path->getPathByClassname($className);
         if ($filePath) {
             return require_once $filePath;
         }
     }
     return false;
 }
示例#3
0
 /**
  * Get asset file with relative path
  * @param string $key File location    
  * @return boolean|string
  */
 public function getAssetUrl($key)
 {
     return ZtPath::getInstance()->getUrl($key);
 }
示例#4
0
 /**
  * Constructor
  * @param object|array $properties
  */
 public function __construct($properties = null)
 {
     parent::__construct($properties);
     /* Init local variables */
     $this->_path = ZtPath::getInstance();
 }