Service/Twitter/Search.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Service  
Subpackage
Twitter  
Version
$Id: Search.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_Service_Twitter_Search

Package: Zend\Service\Twitter

Parent(s)
\Zend_Rest_Client < \Zend_Service_Abstract
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotectedarray $_data = array()
inherited

Data for the query

Inherited from: \Zend_Rest_Client::$$_data
Default valuearray()Details
Type
array
Inherited_from
\Zend_Rest_Client::$$_data  
Propertyprotected\Zend_Http_Client $_httpClient = null
staticinherited

HTTP Client used to query all web services

Inherited from: \Zend_Service_Abstract::$$_httpClient\Zend_Rest_Client::$$_httpClient
Default valuenullDetails
Type
\Zend_Http_Client
Inherited_from
\Zend_Service_Abstract::$$_httpClient  
Inherited_from
\Zend_Rest_Client::$$_httpClient  
Propertyprotectedbool $_noReset = false
inherited

Flag indicating the Zend_Http_Client is fresh and needs no reset.

<p>true if you do not want a reset. Default false.</p>Inherited from: \Zend_Rest_Client::$$_noReset

Must be set explicitly if you want to keep preset parameters.

Default valuefalseDetails
Type
bool
Inherited_from
\Zend_Rest_Client::$$_noReset  
PropertyprotectedString $_responseType = 'json'

Return Type

Default value'json'Details
Type
String
Propertyprotectedarray $_responseTypes = array('atom', 'json')

Response Format Types

Default valuearray('atom', 'json')Details
Type
array
Propertyprotected\Zend_Uri_Http $_uri =

Uri Compoent

Details
Type
\Zend_Uri_Http

Methods

methodpublic__call(string $method, array $args) : \Zend_Rest_Client_Result | \Zend_Rest_Client
inherited

Method call overload

Inherited from: \Zend_Rest_Client::__call()

Allows calling REST actions as object methods; however, you must follow-up by chaining the request with a request to an HTTP request method (post, get, delete, put):

$response = $rest->sayHello('Foo', 'Manchu')->get();

Or use them together, but in sequential calls:

$rest->sayHello('Foo', 'Manchu');
$response = $rest->get();
Parameters
Name Type Description
$method string

Method name

$args array

Method args

Returns
Type Description
\Zend_Rest_Client_Result | \Zend_Rest_Client Zend_Rest_Client if using a remote method, Zend_Rest_Client_Result if using an HTTP request method
methodpublic__construct( $responseType = 'json') : void

Constructor

Parameters
Name Type Description
$responseType
methodprotected_performPost(mixed $method, mixed $data = null) : \Zend_Http_Response
inherited

Perform a POST or PUT

Inherited from: \Zend_Rest_Client::_performPost()

Performs a POST or PUT request. Any data provided is set in the HTTP client. String data is pushed in as raw POST data; array or object data is pushed in as POST parameters.

Parameters
Name Type Description
$method mixed
$data mixed
Returns
Type Description
\Zend_Http_Response
methodprivate_prepareRest(string $path) : void
inherited

Call a remote REST web service URI and return the Zend_Http_Response object

Inherited from: \Zend_Rest_Client::_prepareRest()
Parameters
Name Type Description
$path string

The path to append to the URI

Throws
Exception Description
\Zend_Rest_Client_Exception
methodpublicgetHttpClient() : \Zend_Http_Client
staticfinalinherited

Gets the HTTP client object.

Inherited from: \Zend_Service_Abstract::getHttpClient()\Zend_Rest_Client::getHttpClient()
Returns
Type Description
\Zend_Http_Client
methodpublicgetResponseType() : string

Retrieve responseType

Returns
Type Description
string
methodpublicgetUri() : \Zend_Uri_Http
inherited

Retrieve the current request URI object

Inherited from: \Zend_Rest_Client::getUri()
Returns
Type Description
\Zend_Uri_Http
methodpublicrestDelete(string $path,  $data = null) : \Zend_Http_Response
inherited

Performs an HTTP DELETE request to $path.

Inherited from: \Zend_Rest_Client::restDelete()
Parameters
Name Type Description
$path string
$data
Returns
Type Description
\Zend_Http_Response
Throws
Exception Description
\Zend_Http_Client_Exception
methodpublicrestGet(string $path, array $query = null) : \Zend_Http_Response
inherited

Performs an HTTP GET request to the $path.

Inherited from: \Zend_Rest_Client::restGet()
Parameters
Name Type Description
$path string
$query array

Array of GET parameters

Returns
Type Description
\Zend_Http_Response
Throws
Exception Description
\Zend_Http_Client_Exception
methodpublicrestPost(string $path, mixed $data = null) : \Zend_Http_Response
inherited

Performs an HTTP POST request to $path.

Inherited from: \Zend_Rest_Client::restPost()
Parameters
Name Type Description
$path string
$data mixed

Raw data to send

Returns
Type Description
\Zend_Http_Response
Throws
Exception Description
\Zend_Http_Client_Exception
methodpublicrestPut(string $path, mixed $data = null) : \Zend_Http_Response
inherited

Performs an HTTP PUT request to $path.

Inherited from: \Zend_Rest_Client::restPut()
Parameters
Name Type Description
$path string
$data mixed

Raw data to send in request

Returns
Type Description
\Zend_Http_Response
Throws
Exception Description
\Zend_Http_Client_Exception
methodpublicsearch( $query,  $params = array()) : void

Performs a Twitter search query.

Parameters
Name Type Description
$query
$params
Throws
Exception Description
\Zend_Http_Client_Exception
methodpublicsetHttpClient(\Zend_Http_Client $httpClient) : void
staticfinalinherited

Sets the HTTP client object to use for retrieving the feeds.

Inherited from: \Zend_Service_Abstract::setHttpClient()\Zend_Rest_Client::setHttpClient()

If none is set, the default Zend_Http_Client will be used.

Parameters
Name Type Description
$httpClient \Zend_Http_Client
methodpublicsetNoReset(boolean $bool = true) : void
inherited

Tells Zend_Rest_Client not to reset all parameters on it's Zend_Http_Client.

Inherited from: \Zend_Rest_Client::setNoReset()

If you want no reset, this must be called explicitly before every request for which you do not want to reset the parameters. Parameters will accumulate between requests, but as soon as you do not call this function prior to any request, all preset parameters will be reset as by default.

Parameters
Name Type Description
$bool boolean
methodpublicsetResponseType(string $responseType = 'json') : \Zend_Service_Twitter_Search

set responseType

Parameters
Name Type Description
$responseType string
Returns
Type Description
\Zend_Service_Twitter_Search
Throws
Exception Description
\Zend_Service_Twitter_Exception
methodpublicsetUri(string | \Zend_Uri_Http $uri) : \Zend_Rest_Client
inherited

Set the URI to use in the request

Inherited from: \Zend_Rest_Client::setUri()
Parameters
Name Type Description
$uri string | \Zend_Uri_Http

URI for the web service

Returns
Type Description
\Zend_Rest_Client
methodpublictrends() : array

Get the current twitter trends.

Currnetly only supports json as the return.

Returns
Type Description
array
Throws
Exception Description
\Zend_Http_Client_Exception
Documentation was generated by phpDocumentor 2.0.0a8.