PHP Класс Swiftriver\Core\Modules\SiSPS\Parsers\TwitterParser

Наследование: implements Swiftriver\Core\Modules\SiSPS\Parsers\IParser
Показать файл Открыть проект

Открытые методы

Метод Описание
GetAndParse ( Channel $channel ) : Swiftriver\Core\ObjectModel\Content[] Given a set of parameters, this method should fetch content from a channel and parse each content into the Swiftriver object model : Content Item. The $lastSuccess datetime is passed to the function to ensure that content that has already been parsed is not duplicated.
ListSubTypes ( ) : string[] This method returns a string array with the names of all the source types this parser is designed to parse. For example the RSSParser may return array("Blogs", "News Feeds");
ReturnRequiredParameters ( ) : array() This method returns an array of the required paramters that are nessesary to run this parser. The Array should be in the following format: array( "SubType" => array ( ConfigurationElements ) )
ReturnType ( ) : string This method returns a string describing the type of sources it can parse. For example, the RSSParser returns "Feeds".

Приватные методы

Метод Описание
GetForTwitterAccount ( $channel ) : Content[] User the twitter RSS call to follow the tweets of a given twitter user.
GetForTwitterSearch ( Channel $channel ) : Content[] Uses the twitter search api to return content from twitter.
ParseTweetFromATOMItem ( SimplePie_Item $tweet, Channel $channel ) Parses the simplepie item to a content item
ParseTweetFromJSON ( $tweet, Channel $channel ) : Content[] Method for parsing the json returned from the curl oppertation to content items.
ParseTweetToSanitizedTweetDiffCollection ( Content $item ) : DuplicationIdentificationFieldCollection

Описание методов

GetAndParse() публичный Метод

Given a set of parameters, this method should fetch content from a channel and parse each content into the Swiftriver object model : Content Item. The $lastSuccess datetime is passed to the function to ensure that content that has already been parsed is not duplicated.
public GetAndParse ( Channel $channel ) : Swiftriver\Core\ObjectModel\Content[]
$channel Swiftriver\Core\ObjectModel\Channel
Результат Swiftriver\Core\ObjectModel\Content[] contentItems

ListSubTypes() публичный Метод

This method returns a string array with the names of all the source types this parser is designed to parse. For example the RSSParser may return array("Blogs", "News Feeds");
public ListSubTypes ( ) : string[]
Результат string[]

ReturnRequiredParameters() публичный Метод

This method returns an array of the required paramters that are nessesary to run this parser. The Array should be in the following format: array( "SubType" => array ( ConfigurationElements ) )
public ReturnRequiredParameters ( ) : array()
Результат array()

ReturnType() публичный Метод

This method returns a string describing the type of sources it can parse. For example, the RSSParser returns "Feeds".
public ReturnType ( ) : string
Результат string type of sources parsed