PHP Class Phergie_Plugin_Twitter, phergie

Usage: tweet text to tweet (sends a message to twitter and Phergie will give you the link) twitter username (fetches and displays the last tweet by @username) twitter username 3 (fetches and displays the third last tweet by @username) twitter 1234567 (fetches and displays tweet number 1234567) http://twitter.com/username/statuses/1234567 (same as twitter 1234567)
Inheritance: extends Phergie_Plugin_Abstract
Afficher le fichier Open project: phergie/phergie

Protected Properties

Свойство Type Description
$twitter Twitter Twitter object (from Simpletweet)

Méthodes publiques

Méthode Description
getTwitter ( ) : Twitter Returns the Twitter client instance in use.
onCommandTweet ( $tweet = null )
onCommandTwitter ( string $tweeter, integer $num = 1 ) : void Fetches the associated tweet and relays it to the channel.
onConnect ( ) : void Register with the URL plugin, if possible
onLoad ( ) : void Initialize (set up configuration vars)
renderUrl ( array $parsed ) : boolean Renders Twitter URLs.
setTwitter ( Twitter $twitter ) : Phergie_Plugin_Twitter Sets the Twitter client instance to use.

Méthodes protégées

Méthode Description
formatTweet ( StdClass $tweet, boolean $includeUrl = true ) : string Formats a Tweet into a message suitable for output.

Method Details

formatTweet() protected méthode

Formats a Tweet into a message suitable for output.
protected formatTweet ( StdClass $tweet, boolean $includeUrl = true ) : string
$tweet StdClass JSON-decoded tweet object from Twitter
$includeUrl boolean whether or not to include the URL in the formatted output
Résultat string

getTwitter() public méthode

Returns the Twitter client instance in use.
public getTwitter ( ) : Twitter
Résultat Twitter Twitter client instance

onCommandTweet() public méthode

public onCommandTweet ( $tweet = null )

onCommandTwitter() public méthode

Fetches the associated tweet and relays it to the channel.
public onCommandTwitter ( string $tweeter, integer $num = 1 ) : void
$tweeter string if numeric the tweet number/id, otherwise the twitter user name (optionally prefixed with @, or a URL to a tweet)
$num integer optional offset for this user (number of tweets ago)
Résultat void

onConnect() public méthode

Register with the URL plugin, if possible
public onConnect ( ) : void
Résultat void

onLoad() public méthode

Initialize (set up configuration vars)
public onLoad ( ) : void
Résultat void

renderUrl() public méthode

Renders Twitter URLs.
public renderUrl ( array $parsed ) : boolean
$parsed array parse_url() output for the URL to render
Résultat boolean

setTwitter() public méthode

Sets the Twitter client instance to use.
public setTwitter ( Twitter $twitter ) : Phergie_Plugin_Twitter
$twitter Twitter Twitter instance to set
Résultat Phergie_Plugin_Twitter Provides a fluent interface

Property Details

$twitter protected_oe property

Twitter object (from Simpletweet)
protected Twitter $twitter
Résultat Twitter