PHP Class FastFeed\FastFeed

Inheritance: implements fastfeed\FastFeedInterface
Exibir arquivo Open project: fastfeed/fastfeed Class Usage Examples

Protected Properties

Property Type Description
$feeds array
$http ClientInterface;
$logger Psr\Log\LoggerInterface
$parsers array
$processors array

Public Methods

Method Description
__construct ( Ivory\HttpAdapter\HttpAdapterInterface $http, Psr\Log\LoggerInterface $logger )
addFeed ( string $channel, string $feed ) Add feed to channel
fetch ( string $channel = 'default' ) : Item[]
getFeed ( string $channel ) : string Retrieve a channel
getFeeds ( ) : array Retrieve all channels
popParser ( ) : FastFeed\Parser\ParserInterface
popProcessor ( ) : FastFeed\Processor\ProcessorInterface
pushParser ( FastFeed\Parser\ParserInterface $parser )
pushProcessor ( FastFeed\Processor\ProcessorInterface $processor )
setFeed ( string $channel, string $feed ) Set a channel
setHttpClient ( Guzzle\Http\ClientInterface $guzzle ) Set Guzzle
setLogger ( Psr\Log\LoggerInterface $logger )

Protected Methods

Method Description
get ( $url ) : Guzzle\Http\EntityBodyInterface | string Retrieve content from a resource
log ( $message )
parse ( $content ) : array
retrieve ( $channel ) : array

Method Details

__construct() public method

public __construct ( Ivory\HttpAdapter\HttpAdapterInterface $http, Psr\Log\LoggerInterface $logger )
$http Ivory\HttpAdapter\HttpAdapterInterface
$logger Psr\Log\LoggerInterface

addFeed() public method

Add feed to channel
public addFeed ( string $channel, string $feed )
$channel string
$feed string

fetch() public method

public fetch ( string $channel = 'default' ) : Item[]
$channel string
return Item[]

get() protected method

Retrieve content from a resource
protected get ( $url ) : Guzzle\Http\EntityBodyInterface | string
$url
return Guzzle\Http\EntityBodyInterface | string

getFeed() public method

Retrieve a channel
public getFeed ( string $channel ) : string
$channel string
return string

getFeeds() public method

Retrieve all channels
public getFeeds ( ) : array
return array

log() protected method

protected log ( $message )
$message

parse() protected method

protected parse ( $content ) : array
$content
return array

popParser() public method

public popParser ( ) : FastFeed\Parser\ParserInterface
return FastFeed\Parser\ParserInterface

popProcessor() public method

public popProcessor ( ) : FastFeed\Processor\ProcessorInterface
return FastFeed\Processor\ProcessorInterface

pushParser() public method

public pushParser ( FastFeed\Parser\ParserInterface $parser )
$parser FastFeed\Parser\ParserInterface

pushProcessor() public method

public pushProcessor ( FastFeed\Processor\ProcessorInterface $processor )
$processor FastFeed\Processor\ProcessorInterface

retrieve() protected method

protected retrieve ( $channel ) : array
$channel
return array

setFeed() public method

Set a channel
public setFeed ( string $channel, string $feed )
$channel string
$feed string

setHttpClient() public method

Set Guzzle
public setHttpClient ( Guzzle\Http\ClientInterface $guzzle )
$guzzle Guzzle\Http\ClientInterface

setLogger() public method

public setLogger ( Psr\Log\LoggerInterface $logger )
$logger Psr\Log\LoggerInterface

Property Details

$feeds protected_oe property

protected array $feeds
return array

$http protected_oe property

protected ClientInterface; $http
return ClientInterface;

$logger protected_oe property

protected LoggerInterface,Psr\Log $logger
return Psr\Log\LoggerInterface

$parsers protected_oe property

protected array $parsers
return array

$processors protected_oe property

protected array $processors
return array