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

Class: Services_TwitPic_Request_HTTPRequest

Source Location: /Services_TwitPic-0.1.0/Services/TwitPic/Request/HTTPRequest.php

Class Overview

Services_TwitPic_Request_Common
   |
   --Services_TwitPic_Request_HTTPRequest

HTTP_Request driver for Services_TwitPic


Author(s):

Copyright:

  • 2008 Bill Shupp

Variables

Methods


Child classes:

Services_TwitPic_Request_Mock
Class for mocking response body, code, and supressing sending data.

Inherited Variables

Inherited Methods

Class: Services_TwitPic_Request_Common

Services_TwitPic_Request_Common::__construct()
Stores the endpoint uri and the instance of Services_TwitPic
Services_TwitPic_Request_Common::getResponseBody()
Gets the body of the response.
Services_TwitPic_Request_Common::getResponseCode()
Gets the response code.
Services_TwitPic_Request_Common::sendRequest()
Actually sends the request.
Services_TwitPic_Request_Common::setImage()
Sets the image filename to be uploaded.
Services_TwitPic_Request_Common::setPostVar()
Sets a POST variable.

Class Details

[line 37]
HTTP_Request driver for Services_TwitPic


[ Top ]


Class Variables

$httpRequest =

[line 44]

Instance of HTTP_Request
  • Access: protected

Type:   object


[ Top ]



Method Detail

__construct (Constructor)   [line 54]

void __construct( string $uri, Services_TwitPic $twit)

Sets the options, endpoint, and instatiates HTTP_Request
  • Access: public

Overrides Services_TwitPic_Request_Common::__construct() (Stores the endpoint uri and the instance of Services_TwitPic)

Parameters:

string   $uri   —  URI of the API endpoint
Services_TwitPic   $twit   —  Instance of Services_TwitPic

[ Top ]

getResponseBody   [line 119]

string getResponseBody( )

Gets the body of the response.
  • Access: public

Overridden in child classes as:

Services_TwitPic_Request_Mock::getResponseBody()
Returns the canned response body

Overrides Services_TwitPic_Request_Common::getResponseBody() (Gets the body of the response.)
[ Top ]

getResponseCode   [line 109]

int getResponseCode( )

Gets the response code of the request.
  • Access: public

Overridden in child classes as:

Services_TwitPic_Request_Mock::getResponseCode()
Returns the canned response code

Overrides Services_TwitPic_Request_Common::getResponseCode() (Gets the response code.)
[ Top ]

sendRequest   [line 94]

void sendRequest( )

Sets the User-Agent and actually sends the request to the TwitPic API.
  • Throws: Services_TwitPic_Exception on failure
  • Access: public

Overridden in child classes as:

Services_TwitPic_Request_Mock::sendRequest()
Doesn't actually send anything

Overrides Services_TwitPic_Request_Common::sendRequest() (Actually sends the request.)
[ Top ]

setImage   [line 83]

void setImage( mixed $file)

Sets the image filename to be uploaded.
  • Access: public

Overrides Services_TwitPic_Request_Common::setImage() (Sets the image filename to be uploaded.)

Parameters:

mixed   $file   —  Filename of image.

[ Top ]

setPostVar   [line 71]

void setPostVar( string $field, mixed $value)

Sets a POST variable.
  • Access: public

Overrides Services_TwitPic_Request_Common::setPostVar() (Sets a POST variable.)

Parameters:

string   $field   —  Field name
mixed   $value   —  Field value

[ Top ]


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