Services_Twitter
[ class tree: Services_Twitter ] [ index: Services_Twitter ] [ all elements ]

Class: Services_Twitter_Common

Source Location: /Services_Twitter-0.2.1/Services/Twitter/Common.php

Class Overview


Services_Twitter_Common


Author(s):

Variables

Methods


Child classes:

Services_Twitter
Services_Twitter
Services_Twitter_Friendships
Services_Twitter_Friendships
Services_Twitter_Account
Services_Twitter_Account
Services_Twitter_Notifications
Services_Twitter_Exception
Services_Twitter_DirectMessages
Services_Twitter_DirectMessages
Services_Twitter_Statuses
Services_Twitter_Statuses
Services_Twitter_Users
Services_Twitter_Exception
Services_Twitter_Favorites
Services_Twitter_Favorites
Services_Twitter_Search
Services_Twitter_Search

Inherited Variables

Inherited Methods


Class Details

[line 58]
Services_Twitter_Common


[ Top ]


Class Variables

$name =  null

[line 66]

Name of call group

Type:   string


[ Top ]

$options = array(
        'timeout' => 30,
        'userAgent' => 'Services_Twitter 0.2.1'
    )

[line 90]

Options for HTTP requests and misc.

  • timetout

  • Var: An array of various options
  • Access: protected

Type:   array


[ Top ]

$pass =  ''

[line 80]

Password of Twitter user
  • Var: User's password for Twitter
  • Access: protected

Type:   string


[ Top ]

$user =  ''

[line 73]

Username of Twitter user
  • Var: Twitter username
  • Access: protected

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 103]

void __construct( string $user, string $pass)

Constructor
  • Access: public

Overridden in child classes as:

Services_Twitter_Search::__construct()
Constructor

Parameters:

string   $user   —  Twitter username
string   $pass   —  Twitter password

[ Top ]

sendRequest   [line 162]

object Instance sendRequest( string $endPoint, [array $params = array()], [string $method = 'GET'], [ $output = Services_Twitter::OUTPUT_XML])

Send a request to the Twitter API
  • Return: of SimpleXMLElement
  • Throws: Services_Twitter_Exception
  • Access: protected

Overridden in child classes as:

Services_Twitter_Search::sendRequest()
Send a special request to Search API

Parameters:

string   $endPoint   —  The API endpoint WITHOUT the extension
array   $params   —  The API endpoint arguments to pass
string   $method   —  Whether to use GET or POST
   $output   — 

[ Top ]

setOption   [line 123]

void setOption( string $option, mixed $value)

Set an option in Services_Twitter_Common::$options

If a function exists named _set$option (e.g. _setUserAgent()) then that method will be used instead. Otherwise, the value is set directly into the options array.


Parameters:

string   $option   —  Name of option
mixed   $value   —  Value of option

[ Top ]

setOptions   [line 145]

void setOptions( array $options)

Set a number of options at once

Parameters:

array   $options   —  The options to set

[ Top ]

__call   [line 287]

object Instance __call( string $function, [array $args = array()])

Overloaded call for API passthrough

Takes the function called and magically creates an API endpoint based on the class name / grouping name and the function name. For instance, a call to $twitter->statuses->followers() would call the API endpoint '/statuses/followers.xml' and return the results.


Overridden in child classes as:

Services_Twitter_Friendships::__call()
__call
Services_Twitter_DirectMessages::__call()
__call

Parameters:

string   $function   —  API endpoint being called
array   $args   —  $args[0] is an array of GET/POST arguments

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:31:23 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.