dmBridge PHP API
DMHTTPRequest Class Reference

Encapsulates an HTTP request. More...

Inheritance diagram for DMHTTPRequest:

Public Member Functions

Static Public Member Functions


Detailed Description

Encapsulates an HTTP request.

The incoming request is accessible via getCurrent(). Outgoing requests can be created manually and sent using DMHTTPClient.

Author:
Alex Dolski <alex.dolski@unlv.edu> http://www.opensource.org/licenses/mit-license.php

Definition at line 17 of file DMHTTPRequest.php.


Constructor & Destructor Documentation

DMHTTPRequest::__construct ( DMURI uri = null,
method = DMHTTPMethod::GET 
)
Parameters:
DMURIuri
intmethod One of the DMHTTPMethod constants

Definition at line 154 of file DMHTTPRequest.php.


Member Function Documentation

static DMHTTPRequest::getCurrent ( ) [static]
Returns:
DMHTTPRequest

Definition at line 38 of file DMHTTPRequest.php.

Referenced by DMJSONPRepresentationTransformerV1::__construct(), DMXMLRepresentationTransformer::addSchema(), DMCdmAuthenticationService::authenticate(), DMAPIObjectController::comments(), DMAPIObjectController::compoundSearch(), DMObjectCommentForm::doAction(), DMObject::getCdmURI(), DMGenericTemplateHelper::getFeedURL(), DMObject::getFileURL(), DMObjectTemplateHelper::getHtmlCommentsSection(), DMObjectTemplateHelper::getHtmlCompoundObjectSearchForm(), DMSearchTemplateHelper::getHtmlDateSearch(), DMResultsTemplateHelper::getHtmlFacetsAsUL(), DMSearchTemplateHelper::getHtmlFieldSearch(), DMGenericTemplateHelper::getHtmlFormattedFlash(), UNLVSpatialTemplateHelper::getHtmlGoogleMapsSpatialSearch(), DMObjectTemplateHelper::getHtmlHighlightedFullText(), DMGenericTemplateHelper::getHtmlLoginPageLink(), DMControlPanelTemplateHelper::getHtmlMainMenu(), DMResultsTemplateHelper::getHtmlPageLinks(), DMSearchTemplateHelper::getHtmlProximitySearch(), DMObjectTemplateHelper::getHtmlRatingsSection(), DMResultsTemplateHelper::getHtmlResults(), DMObjectResultsTemplateHelper::getHtmlResults(), DMObjectTemplateHelper::getHtmlResultsAsUL(), DMResultsTemplateHelper::getHtmlSortLinksAsUL(), DMObjectTemplateHelper::getHtmlTaggingSection(), DMResultsTemplateHelper::getHtmlViewLinks(), DMAbstractController::getHTTPRequest(), DMObject::getImageURL(), DMURI::getLocalURIWithPath(), DMObject::getReferenceURL(), DMHTTPResponseFactory::getRepresentation(), DMObject::getThumbURL(), DMHTTPResponseFactory::getTransformer(), DMObject::getURI(), DMInternalURI::getURIWithParams(), DMAPIObjectController::highestRated(), UNLVSpatialController::index(), DMAPITagController::index(), DMAPIObjectController::index(), DMAPICommentController::index(), DMObject::isFavorite(), DMAbstractAuthenticationService::logout(), redirectToParams(), DMAPIVocabularyController::suggest(), DMXMLRepresentationTransformerV1::transformObject(), DMJSONRepresentationTransformerV1::transformObject(), and UNLVSpatialXMLRepresentationV1::transformSpatialResults().

DMHTTPRequest::getMethod ( )
Returns:
int One of the DMHTTPMethod constants

Definition at line 168 of file DMHTTPRequest.php.

DMHTTPRequest::getPassword ( )
Returns:
string The password to supply for HTTP authentication.

Definition at line 182 of file DMHTTPRequest.php.

DMHTTPRequest::getRedirectedURI ( )
Returns:
DMURI Clone of the URI to which the request was ultimately redirected. If the request was not redirected, returns null.
See also:
getURI()

Definition at line 198 of file DMHTTPRequest.php.

DMHTTPRequest::getSession ( )
Returns:
DMSession The session associated with the request. This applies only to incoming requests.

Definition at line 214 of file DMHTTPRequest.php.

DMHTTPRequest::getURI ( )
Returns:
DMURI A clone of the request's URI
See also:
getRedirectedURI()

Definition at line 230 of file DMHTTPRequest.php.

Referenced by reload().

DMHTTPRequest::getUsername ( )
Returns:
string

Definition at line 245 of file DMHTTPRequest.php.

static DMHTTPRequest::redirectToParams ( params,
array $  query = array() 
) [static]

Redirects to a given set of URI params.

Must be called before the HTTP header has been output.

Parameters:
stringparams
arrayquery Optional array of key => value query string pairs
Since:
0.1

Definition at line 95 of file DMHTTPRequest.php.

Referenced by DMCPAdminController::authorize(), DMTEObjectController::compoundSearch(), DMAbstractController::handleForm(), DMCPAdminController::login(), DMTEUserController::logout(), and DMCPAdminController::logout().

static DMHTTPRequest::redirectToURI ( DMURI uri) [static]

Redirects to a given URI via a HTTP 302 redirect header.

Must be called before the HTTP header has been output.

Parameters:
DMURIuri
Since:
2.0

Definition at line 116 of file DMHTTPRequest.php.

Referenced by redirectToParams(), and reload().

static DMHTTPRequest::reload ( ) [static]

"Redirects" to the current URI via a HTTP 302 redirect header.

Must be called before the HTTP header has been output.

Definition at line 124 of file DMHTTPRequest.php.

Referenced by DMAbstractController::handleForm().

DMHTTPRequest::setMethod ( method)
Parameters:
intmethod One of the DMHTTPMethod constants

Definition at line 175 of file DMHTTPRequest.php.

Referenced by __construct().

DMHTTPRequest::setPassword ( password)
Parameters:
stringpassword The password to supply for HTTP authentication.

Definition at line 189 of file DMHTTPRequest.php.

DMHTTPRequest::setRedirectedURI ( DMURI uri)
Parameters:
DMURIuri The URI to which the request was ultimately redirected.
See also:
setURI()

Definition at line 206 of file DMHTTPRequest.php.

DMHTTPRequest::setSession ( DMSession session)
Parameters:
DMSessionsession The session associated with the request. This applies only to incoming requests.

Definition at line 222 of file DMHTTPRequest.php.

DMHTTPRequest::setURI ( DMURI uri)
Parameters:
DMURIuri
See also:
setRedirectedURI()

Definition at line 238 of file DMHTTPRequest.php.

Referenced by __construct(), and DMBridgeVersion::getCurrentDmBridgeVersionSequence().

DMHTTPRequest::setUsername ( username)
Parameters:
stringusername

Definition at line 252 of file DMHTTPRequest.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables