/** * 在Scripts开头追加内容 * @access public * @param string $str * @return XF_View_Helper_Header_Script */ public function prependFile($str) { //防止与缓存中的路径重复 $path = XF_View::getInstance()->getResourcePath(); $str = str_replace($path, '', $str); array_unshift($this->_scripts, XF_String::text($path . $str)); return $this; }
/** * 在标题前方添加内容 * @access public * @param string $str * @return View_Header_Title */ public function prependTitle($str) { $this->_title = XF_String::text($str, false) . $this->_linkSymbol . $this->_title; return $this; }
/** * 在Meta尾部追加内容 * @access public * @param string $str * @return XF_View_Helper_Header_Meta */ public function appendMeta($str) { $this->_metas[] = XF_String::text($str); return $this; }
/** * 在Link尾部追加内容 * @access public * @param string $str * @return XF_View_Helper_Header_Link */ public function appendLink($str) { $this->_links[] = XF_String::text($str); return $this; }