예제 #1
0
	/**
	 *	Overload default {@see AtomizerStruct::fromXML} function to support
	 *	inclusion of items
	 *
	 *	@param	DOMElement	The XML data to create this feed from
	 */
	public function fromXML( $xml ) {

		parent::fromXML( $xml );

		$items = $xml->getElementsByTagName('item');
		
		foreach( $items as $node ) {
			$this->addItem( new AtomizerItem( $node ) );
		}
	}
예제 #2
0
	public function __construct( $copy = NULL ) {

		parent::__construct( array(
				'title' => 'string',
				'link' => 'string',
				'description' => 'string',
				'pubDate' => 'string'
			)
		);

		if( is_a( $copy, get_class( $this ) ) ) {
			$this->fromCopy( $copy );
		} else if( is_array( $copy ) ) {
			$this->fromArray( $copy );
		} else if( $copy ) {
			$this->fromXML( $copy );
		}
	}