Archive

Archive for December 19, 2009

class Syndication

December 19, 2009 Comments off

Notice: This class is subject to change.

interface ISyndication:

<?php

interface ISyndication
{
	function GetBaseTags();
	function GetTitles( $maxLimit );
	function GetEntries( $maxLimit );
}

?>

class FeedReaderBase:

The base class for parsing xml feeds.


<?php

	require_once __DIR__.DIRECTORY_SEPARATOR.'interface.isyndication.php';
/**
 * class FeedReaderBase
 *
 * The base class for parsing xml feeds.
 *
 * @author     	Costin Trifan 
 * @copyright  	2009 Costin Trifan
 * @licence    	MIT License:	http://en.wikipedia.org/wiki/MIT_License
 * @last update	Dec. 2009
 * @version    	1.0
 */
class FeedReaderBase implements ISyndication
{
	private function __clone(){}
	private function __sleep(){}
	private function __wakeup(){}

	final public function __get( $name ) { throw new Exception('Method: "__get" is not allowed in class: '.__CLASS__); }
	final public function __set( $name, $value ) { throw new Exception('Method: "__set" is not allowed in class: '.__CLASS__); }

	/*[[ MUST OVERRIDE ]]*/
	public function GetBaseTags(){}
	public function GetTitles( $maxLimit ){}
	public function GetEntries( $maxLimit ){}
}
/*[ end class ]*/

?>

Read more…

Categories: PHP Tags: ,
Follow

Get every new post delivered to your Inbox.