PHP Class Pop\Feed\Reader

Author: Nick Sagona, III ([email protected])
Mostra file Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Property Type Description
$adapter Pop\Feed\Format\AbstractFormat Feed adapter
$dateFormat string Feed date format
$template string Feed item template

Public Methods

Method Description
__construct ( AbstractFormat $adapter ) : Reader Constructor
__get ( string $name ) : mixed Get method to return the value of feed[$name].
__toString ( ) : string Render feed reader object to string
adapter ( ) : AbstractFormat Method to get the adapter object
factory ( AbstractFormat $adapter ) : Reader Static method to instantiate the data object and return itself to facilitate chaining methods together.
feed ( ) : array Method to get the adapter object feed
getByAccountId ( string $service, string $id, integer $limit, string $prefix = 'Pop\Feed\Format\' ) : Reader Static method to create a Feed Reader object from an account ID
getByAccountName ( string $service, string $name, integer $limit, string $prefix = 'Pop\Feed\Format\' ) : Reader Static method to create a Feed Reader object from an account name
getByUrl ( string $url, integer $limit, string $prefix = 'Pop\Feed\Format\' ) : Reader Static method to create a Feed Reader object from a URL
getDateFormat ( ) : string Method to get feed date format
getTemplate ( ) : string Method to get feed template
isAtom ( ) : boolean Method to determine if the feed type is Atom
isFacebook ( ) : boolean Method to determine if the feed type is Facebook
isJson ( ) : boolean Method to determine if the feed type is JSON
isPhp ( ) : boolean Method to determine if the feed type is PHP
isPlaylist ( ) : boolean Method to determine if the feed type is a playlist
isRss ( ) : boolean Method to determine if the feed type is RSS
isTwitter ( ) : boolean Method to determine if the feed type is Twitter
isVimeo ( ) : boolean Method to determine if the feed type is Twitter
isYoutube ( ) : boolean Method to determine if the feed type is YouTube
render ( boolean $ret = false ) : mixed Method to render the feed
setDateFormat ( string $date ) : Reader Method to set date format
setTemplate ( string $tmpl ) : Reader Method to set item template

Protected Methods

Method Description
getSource ( string $url ) : array Static method to create a Feed Reader object from a URL

Method Details

__construct() public method

Instantiate the feed object.
public __construct ( AbstractFormat $adapter ) : Reader
$adapter Pop\Feed\Format\AbstractFormat
return Reader

__get() public method

Get method to return the value of feed[$name].
public __get ( string $name ) : mixed
$name string
return mixed

__toString() public method

Render feed reader object to string
public __toString ( ) : string
return string

adapter() public method

Method to get the adapter object
public adapter ( ) : AbstractFormat
return Pop\Feed\Format\AbstractFormat

factory() public static method

Static method to instantiate the data object and return itself to facilitate chaining methods together.
public static factory ( AbstractFormat $adapter ) : Reader
$adapter Pop\Feed\Format\AbstractFormat
return Reader

feed() public method

Method to get the adapter object feed
public feed ( ) : array
return array

getByAccountId() public static method

Static method to create a Feed Reader object from an account ID
public static getByAccountId ( string $service, string $id, integer $limit, string $prefix = 'Pop\Feed\Format\' ) : Reader
$service string
$id string
$limit integer
$prefix string
return Reader

getByAccountName() public static method

Static method to create a Feed Reader object from an account name
public static getByAccountName ( string $service, string $name, integer $limit, string $prefix = 'Pop\Feed\Format\' ) : Reader
$service string
$name string
$limit integer
$prefix string
return Reader

getByUrl() public static method

Static method to create a Feed Reader object from a URL
public static getByUrl ( string $url, integer $limit, string $prefix = 'Pop\Feed\Format\' ) : Reader
$url string
$limit integer
$prefix string
return Reader

getDateFormat() public method

Method to get feed date format
public getDateFormat ( ) : string
return string

getSource() protected static method

Static method to create a Feed Reader object from a URL
protected static getSource ( string $url ) : array
$url string
return array

getTemplate() public method

Method to get feed template
public getTemplate ( ) : string
return string

isAtom() public method

Method to determine if the feed type is Atom
public isAtom ( ) : boolean
return boolean

isFacebook() public method

Method to determine if the feed type is Facebook
public isFacebook ( ) : boolean
return boolean

isJson() public method

Method to determine if the feed type is JSON
public isJson ( ) : boolean
return boolean

isPhp() public method

Method to determine if the feed type is PHP
public isPhp ( ) : boolean
return boolean

isPlaylist() public method

Method to determine if the feed type is a playlist
public isPlaylist ( ) : boolean
return boolean

isRss() public method

Method to determine if the feed type is RSS
public isRss ( ) : boolean
return boolean

isTwitter() public method

Method to determine if the feed type is Twitter
public isTwitter ( ) : boolean
return boolean

isVimeo() public method

Method to determine if the feed type is Twitter
public isVimeo ( ) : boolean
return boolean

isYoutube() public method

Method to determine if the feed type is YouTube
public isYoutube ( ) : boolean
return boolean

render() public method

Method to render the feed
public render ( boolean $ret = false ) : mixed
$ret boolean
return mixed

setDateFormat() public method

Method to set date format
public setDateFormat ( string $date ) : Reader
$date string
return Reader

setTemplate() public method

Method to set item template
public setTemplate ( string $tmpl ) : Reader
$tmpl string
return Reader

Property Details

$adapter protected_oe property

Feed adapter
protected AbstractFormat,Pop\Feed\Format $adapter
return Pop\Feed\Format\AbstractFormat

$dateFormat protected_oe property

Feed date format
protected string $dateFormat
return string

$template protected_oe property

Feed item template
protected string $template
return string