public function path() { return Manager::getPath(); }
/** * */ protected static function _build($items, $type, $comment = null) { if (!static::_initialize()) { return false; } $tpl = 'css' === $type ? '<link rel="stylesheet" href="{path}">' : '<script type="text/javascript" src="{path}"></script>'; $dep = $comment ? "\t" . '<!-- ' . $comment . '-->' . "\n" : null; $items = is_array($items) ? $items : array($items); foreach ($items as $item) { if (!isset(static::$_resources[$item])) { trigger_error('Resource id "' . $item . '" is not set!', E_USER_ERROR); return false; } $path = !static::$_resources[$item]['external'] ? Manager::getPath() : null; $item = static::$_resources[$item]['file']; $dep .= "\t" . str_replace('{path}', $path . $item, $tpl) . "\n"; } return $dep; }