PHP Class Pop\Feed\Format\AbstractFormat

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

Protected Properties

Property Type Description
$context resource Stream context
$contextOptions integer Context options
$feed array Feed content
$limit integer Feed limit
$obj mixed Parsed object
$options mixed Feed options
$source string Feed source
$url string URL to parse
$urls array Feed URLs templates

Public Methods

Method Description
__construct ( mixed $options, integer $limit ) : AbstractFormat Method to parse a feed object
__get ( string $name ) : mixed Get method to return the value of feed[$name].
__isset ( string $name ) : boolean Return the isset value of feed[$name].
__set ( string $name, mixed $value ) : void Set method to set the property to the value of feed[$name].
__unset ( string $name ) : void Unset feed[$name].
calculateTime ( string $time ) : string Method to calculate the elapsed time between the date passed and now.
getFeed ( ) : array Method to get the feed
getLimit ( ) : integer Method to get the limit
getOptions ( ) : mixed Method to get the feed options
obj ( ) : mixed Method to get the parsed object
parse ( ) : void Method to parse a feed object
setFeed ( array $feed = [] ) : AbstractFormat Method to set the feed
url ( ) : string Method to get the URL

Method Details

__construct() public method

Method to parse a feed object
public __construct ( mixed $options, integer $limit ) : AbstractFormat
$options mixed
$limit integer
return AbstractFormat

__get() public method

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

__isset() public method

Return the isset value of feed[$name].
public __isset ( string $name ) : boolean
$name string
return boolean

__set() public method

Set method to set the property to the value of feed[$name].
public __set ( string $name, mixed $value ) : void
$name string
$value mixed
return void

__unset() public method

Unset feed[$name].
public __unset ( string $name ) : void
$name string
return void

calculateTime() public static method

Method to calculate the elapsed time between the date passed and now.
public static calculateTime ( string $time ) : string
$time string
return string

getFeed() public method

Method to get the feed
public getFeed ( ) : array
return array

getLimit() public method

Method to get the limit
public getLimit ( ) : integer
return integer

getOptions() public method

Method to get the feed options
public getOptions ( ) : mixed
return mixed

obj() public method

Method to get the parsed object
public obj ( ) : mixed
return mixed

parse() abstract public method

Method to parse a feed object
abstract public parse ( ) : void
return void

setFeed() public method

Method to set the feed
public setFeed ( array $feed = [] ) : AbstractFormat
$feed array
return AbstractFormat

url() public method

Method to get the URL
public url ( ) : string
return string

Property Details

$context protected property

Stream context
protected resource $context
return resource

$contextOptions protected property

Context options
protected int $contextOptions
return integer

$feed protected property

Feed content
protected array $feed
return array

$limit protected property

Feed limit
protected int $limit
return integer

$obj protected property

Parsed object
protected mixed $obj
return mixed

$options protected property

Feed options
protected mixed $options
return mixed

$source protected property

Feed source
protected string $source
return string

$url protected property

URL to parse
protected string $url
return string

$urls protected property

Feed URLs templates
protected array $urls
return array