⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xml_domit_rss.php

📁 Joomla!是一套获得过多个奖项的内容管理系统(Content Management System, CMS)。Joomla!采用PHP+MySQL数据库开发
💻 PHP
📖 第 1 页 / 共 3 页
字号:
		return $this->getElementText(DOMIT_RSS_ELEMENT_LINK);	} //getLink	/**	* Returns the image url	* @return string The image url	*/	function getUrl() {		return $this->getElementText(DOMIT_RSS_ELEMENT_URL);	} //getUrl	/**	* Returns the image width in pixels	* @return string The image width (maximum 144, default 88)	*/	function getWidth() {		$myWidth = $this->getElementText(DOMIT_RSS_ELEMENT_WIDTH);		if ($myWidth == '') {			$myWidth = '88';		}		else if (intval($myWidth) > 144) {	        $myWidth = '144';		}		return $myWidth;	} //getWidth	/**	* Returns the image height in pixels	* @return string The image height (maximum 400, default 31)	*/	function getHeight() {		$myHeight = $this->getElementText(DOMIT_RSS_ELEMENT_HEIGHT);		if ($myHeight == '') {			$myHeight = '31';		}		else if (intval($myHeight) > 400) {	        $myHeight = '400';		}		return $myHeight;	} //getHeight	/**	* Returns the image description	* @return string The image description	*/	function getDescription() {		return $this->getElementText(DOMIT_RSS_ELEMENT_DESCRIPTION);	} //getDescription} //xml_domit_rss_image/*** Represents an RSS text input form** @package domit-rss* @subpackage domit-rss-main* @author John Heinstein <johnkarl@nbnet.nb.ca>*/class xml_domit_rss_textinput extends xml_domit_rss_elementindexer {	/**	* Constructor	* @param Object A DOM node containing text input data	*/	function xml_domit_rss_textinput(&$textinput) {		$this->node =& $textinput;		$this->rssDefinedElements = array('title','link','description','name');		$this->_init();	} //xml_domit_rss_textinput	/**	* Performs initialization of textInput element	*/	function _init(){		$total = $this->node->childCount;		for($i = 0; $i < $total; $i++) {			$currNode =& $this->node->childNodes[$i];			$tagName = strtolower($currNode->nodeName);		    switch ($tagName) {                case DOMIT_RSS_ELEMENT_TITLE:                case DOMIT_RSS_ELEMENT_LINK:                case DOMIT_RSS_ELEMENT_DESCRIPTION:                case DOMIT_RSS_ELEMENT_NAME:				    $this->DOMIT_RSS_indexer[$tagName] = new xml_domit_rss_simpleelement($currNode);				    break;				default:				    $this->addIndexedElement($currNode);				    //$this->DOMIT_RSS_indexer[$tagName] =& $currNode;		    }		}	} //_init	/**	* Returns the title of the text input	* @return string The title of the text input, or an empty string	*/	function getTitle() {		return $this->getElementText(DOMIT_RSS_ELEMENT_TITLE);	} //getTitle	/**	* Returns a description of the text input	* @return string A description of the text input, or an empty string	*/	function getDescription() {		return $this->getElementText(DOMIT_RSS_ELEMENT_DESCRIPTION);	} //getDescription	/**	* Returns the name of the text input	* @return string The name of the text input, or an empty string	*/	function getName() {		return $this->getElementText(DOMIT_RSS_ELEMENT_NAME);	} //getName	/**	* Returns the url of the text input	* @return string The url of the text input, or an empty string	*/	function getLink() {		return $this->getElementText(DOMIT_RSS_ELEMENT_LINK);	} //getLink} //xml_domit_rss_textinput/*** Represents an RSS cloud** @package domit-rss* @subpackage domit-rss-main* @author John Heinstein <johnkarl@nbnet.nb.ca>*/class xml_domit_rss_cloud extends xml_domit_rss_elementindexer {	/**	* Constructor	* @param Object A DOM node containing cloud data	*/	function xml_domit_rss_cloud(&$cloud) {		$this->node =& $cloud;		$this->_init();	} //xml_domit_rss_cloud	/**	* Returns the domain of the cloud	* @return string The domain of the cloud	*/	function getDomain() {		return $this->getAttribute(DOMIT_RSS_ATTR_DOMAIN);	} //getDomain	/**	* Returns the port of the cloud	* @return string The port of the cloud	*/	function getPort() {		return $this->getAttribute(DOMIT_RSS_ATTR_PORT);	} //getPort	/**	* Returns the path of the cloud	* @return string The path of the cloud	*/	function getPath() {		return $this->getAttribute(DOMIT_RSS_ATTR_PATH);	} //getPath	/**	* Returns the register procedure value of the cloud	* @return string The register procedure value of the cloud	*/	function getRegisterProcedure() {		return $this->getAttribute(DOMIT_RSS_ATTR_REGISTERPROCEDURE);	} //getRegisterProcedure	/**	* Returns the protocol used by the cloud	* @return string The protocol used by the cloud	*/	function getProtocol() {		return $this->getAttribute(DOMIT_RSS_ATTR_PROTOCOL);	} //getProtocol} //xml_domit_rss_cloud/*** Represents an RSS enclosure** @package domit-rss* @subpackage domit-rss-main* @author John Heinstein <johnkarl@nbnet.nb.ca>*/class xml_domit_rss_enclosure extends xml_domit_rss_elementindexer {	/**	* Constructor	* @param Object A DOM node containing enclosure data	*/	function xml_domit_rss_enclosure(&$enclosure) {		$this->node =& $enclosure;		$this->_init();	} //xml_domit_rss_enclosure	/**	* Returns the url of the enclosure	* @return string The url of the enclosure	*/	function getUrl() {		return $this->getAttribute(DOMIT_RSS_ATTR_URL);	} //getUrl	/**	* Returns the length of the enclosure	* @return string The length of the enclosure	*/	function getLength() {		return $this->getAttribute(DOMIT_RSS_ATTR_LENGTH);	} //getLength	/**	* Returns the type of the enclosure	* @return string The type of the enclosure	*/	function getType() {		return $this->getAttribute(DOMIT_RSS_ATTR_TYPE);	} //getType} //xml_domit_rss_enclosure/*** Represents an RSS guid** @package domit-rss* @subpackage domit-rss-main* @author John Heinstein <johnkarl@nbnet.nb.ca>*/class xml_domit_rss_guid extends xml_domit_rss_elementindexer {	/**	* Constructor	* @param Object A DOM node containing guid data	*/	function xml_domit_rss_guid(&$guid) {		$this->node =& $guid;		$this->_init();	} //xml_domit_rss_guid	/**	* Returns the guid text	* @return string The guid text	*/	function getGuid() {	    return $this->node->getText();	} //getGuid	/**	* Determines whether the guid is a permalink	* @return boolean True if the guid is a permalink (default true)	*/	function isPermaLink() {	    if (!$this->node->hasAttribute(DOMIT_RSS_ATTR_ISPERMALINK)) {	        return true;	    }	    else {			return (strtolower($this->node->getAttribute(DOMIT_RSS_ATTR_ISPERMALINK)) == "true");	    }	} //isPermaLink} //xml_domit_rss_guid/*** Represents an RSS source** @package domit-rss* @subpackage domit-rss-main* @author John Heinstein <johnkarl@nbnet.nb.ca>*/class xml_domit_rss_source extends xml_domit_rss_elementindexer {	/**	* Constructor	* @param Object A DOM node containing source data	*/	function xml_domit_rss_source(&$source) {		$this->node =& $source;		$this->_init();	} //xml_domit_rss_source	/**	* Returns the source text	* @return string The source text	*/	function getSource() {	    return $this->node->getText();	} //getSource	/**	* Returns the url of the source	* @return string The url of the source	*/	function getUrl() {		return $this->getAttribute(DOMIT_RSS_ATTR_URL);	} //getUrl} //xml_domit_rss_source/*** Represents an RSS skipDays element** @package domit-rss* @subpackage domit-rss-main* @author John Heinstein <johnkarl@nbnet.nb.ca>*/class xml_domit_rss_skipdays extends xml_domit_rss_elementindexer {	/**	* Constructor	* @param Object A DOM node containing source data	*/	function xml_domit_rss_skipdays(&$skipdays) {		$this->node =& $skipdays;		$this->_init();	} //xml_domit_rss_skipdays	/**	* Returns the number of skip day items	* @return int The number of skip day items	*/	function getSkipDayCount() {	    return $this->node->childCount;	} //getSkipDayCount	/**	* Returns the day of the specified index (Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday)	* @param int The index of the requested day	* @return string The day of the specified index (Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday)	*/	function getSkipDay($index) {		return $this->node->childNodes[$index]->getText();	} //getSkipDay} //xml_domit_rss_skipdays/*** Represents an RSS skipHours element** @package domit-rss* @subpackage domit-rss-main* @author John Heinstein <johnkarl@nbnet.nb.ca>*/class xml_domit_rss_skiphours extends xml_domit_rss_elementindexer {	/**	* Constructor	* @param Object A DOM node containing source data	*/	function xml_domit_rss_skiphours(&$skiphours) {		$this->node =& $skiphours;		$this->_init();	} //xml_domit_rss_skiphours	/**	* Returns the number of skip hour items	* @return int The number of skip hour items	*/	function getSkipHourCount() {	    return $this->node->childCount;	} //getSkipHourCount	/**	* Returns the hour of the specified index (0-23)	* @param int The index of the requested hour	* @return string The hour of the specified index (0-23)	*/	function getSkipHour($index) {		return $this->node->childNodes[$index]->getText();	} //getSkipHour} //xml_domit_rss_skiphours?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -