public static function import($key) { $path = ZtPath::getInstance(); $filePath = $path->getPath($key); if ($filePath) { return require_once $filePath; } return false; }
/** * Include another template into current template * @return \ZtHtml */ public function load($key) { $tplFile = $this->_path->getPath($key); if ($tplFile) { $properties = $this->getProperties(); extract($properties, EXTR_REFS); include $tplFile; } return $this; }
/** * * @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; }
/** * Get asset file with relative path * @param string $key File location * @return boolean|string */ public function getAssetUrl($key) { return ZtPath::getInstance()->getUrl($key); }