PHP Class Pop\Feed\Reader

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

Protected Properties

Свойство Type Description
$adapter Pop\Feed\Format\AbstractFormat Feed adapter
$dateFormat string Feed date format
$template string Feed item template

Méthodes publiques

Méthode 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

Méthodes protégées

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

Method Details

__construct() public méthode

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

__get() public méthode

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

__toString() public méthode

Render feed reader object to string
public __toString ( ) : string
Résultat string

adapter() public méthode

Method to get the adapter object
public adapter ( ) : AbstractFormat
Résultat Pop\Feed\Format\AbstractFormat

factory() public static méthode

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
Résultat Reader

feed() public méthode

Method to get the adapter object feed
public feed ( ) : array
Résultat array

getByAccountId() public static méthode

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
Résultat Reader

getByAccountName() public static méthode

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
Résultat Reader

getByUrl() public static méthode

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
Résultat Reader

getDateFormat() public méthode

Method to get feed date format
public getDateFormat ( ) : string
Résultat string

getSource() protected static méthode

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

getTemplate() public méthode

Method to get feed template
public getTemplate ( ) : string
Résultat string

isAtom() public méthode

Method to determine if the feed type is Atom
public isAtom ( ) : boolean
Résultat boolean

isFacebook() public méthode

Method to determine if the feed type is Facebook
public isFacebook ( ) : boolean
Résultat boolean

isJson() public méthode

Method to determine if the feed type is JSON
public isJson ( ) : boolean
Résultat boolean

isPhp() public méthode

Method to determine if the feed type is PHP
public isPhp ( ) : boolean
Résultat boolean

isPlaylist() public méthode

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

isRss() public méthode

Method to determine if the feed type is RSS
public isRss ( ) : boolean
Résultat boolean

isTwitter() public méthode

Method to determine if the feed type is Twitter
public isTwitter ( ) : boolean
Résultat boolean

isVimeo() public méthode

Method to determine if the feed type is Twitter
public isVimeo ( ) : boolean
Résultat boolean

isYoutube() public méthode

Method to determine if the feed type is YouTube
public isYoutube ( ) : boolean
Résultat boolean

render() public méthode

Method to render the feed
public render ( boolean $ret = false ) : mixed
$ret boolean
Résultat mixed

setDateFormat() public méthode

Method to set date format
public setDateFormat ( string $date ) : Reader
$date string
Résultat Reader

setTemplate() public méthode

Method to set item template
public setTemplate ( string $tmpl ) : Reader
$tmpl string
Résultat Reader

Property Details

$adapter protected_oe property

Feed adapter
protected AbstractFormat,Pop\Feed\Format $adapter
Résultat Pop\Feed\Format\AbstractFormat

$dateFormat protected_oe property

Feed date format
protected string $dateFormat
Résultat string

$template protected_oe property

Feed item template
protected string $template
Résultat string