PHP Class FastFeed\FastFeed

Inheritance: implements fastfeed\FastFeedInterface
Afficher le fichier Open project: fastfeed/fastfeed Class Usage Examples

Protected Properties

Свойство Type Description
$feeds array
$http ClientInterface;
$logger Psr\Log\LoggerInterface
$parsers array
$processors array

Méthodes publiques

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

Méthodes protégées

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

Method Details

__construct() public méthode

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

addFeed() public méthode

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

fetch() public méthode

public fetch ( string $channel = 'default' ) : Item[]
$channel string
Résultat Item[]

get() protected méthode

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

getFeed() public méthode

Retrieve a channel
public getFeed ( string $channel ) : string
$channel string
Résultat string

getFeeds() public méthode

Retrieve all channels
public getFeeds ( ) : array
Résultat array

log() protected méthode

protected log ( $message )
$message

parse() protected méthode

protected parse ( $content ) : array
$content
Résultat array

popParser() public méthode

public popParser ( ) : FastFeed\Parser\ParserInterface
Résultat FastFeed\Parser\ParserInterface

popProcessor() public méthode

public popProcessor ( ) : FastFeed\Processor\ProcessorInterface
Résultat FastFeed\Processor\ProcessorInterface

pushParser() public méthode

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

pushProcessor() public méthode

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

retrieve() protected méthode

protected retrieve ( $channel ) : array
$channel
Résultat array

setFeed() public méthode

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

setHttpClient() public méthode

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

setLogger() public méthode

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

Property Details

$feeds protected_oe property

protected array $feeds
Résultat array

$http protected_oe property

protected ClientInterface; $http
Résultat ClientInterface;

$logger protected_oe property

protected LoggerInterface,Psr\Log $logger
Résultat Psr\Log\LoggerInterface

$parsers protected_oe property

protected array $parsers
Résultat array

$processors protected_oe property

protected array $processors
Résultat array