Cheetah
|
Public Member Functions | |
__construct ($parameters=array(), $statusCode=200, $headers=array()) | |
__toString () | |
getStatusCode () | |
setStatusCode ($statusCode, $text=null) | |
getStatusText () | |
getParameters () | |
setParameters (array $parameters) | |
addParameters (array $parameters) | |
getParameter ($name, $default=null) | |
setParameter ($name, $value) | |
setHttpHeaders (array $httpHeaders) | |
setHttpHeader ($name, $value) | |
addHttpHeaders (array $httpHeaders) | |
getHttpHeaders () | |
getHttpHeader ($name, $default=null) | |
getResponseBody ($format='json') | |
send ($format='json') | |
setError ($statusCode, $error, $errorDescription=null, $errorUri=null) | |
setRedirect ($statusCode, $url, $state=null, $error=null, $errorDescription=null, $errorUri=null) | |
isInvalid () | |
isInformational () | |
isSuccessful () | |
isRedirection () | |
isClientError () | |
isServerError () | |
![]() | |
setStatusCode ($statusCode) | |
getParameter ($name) | |
Public Attributes | |
$version | |
Static Public Attributes | |
static | $statusTexts |
Protected Member Functions | |
buildHeader ($name, $value) | |
Protected Attributes | |
$statusCode = 200 | |
$statusText | |
$parameters = array() | |
$httpHeaders = array() | |
Class to handle OAuth2 Responses in a graceful way. Use this interface to output the proper OAuth2 responses.
This class borrows heavily from the Symfony2 Framework and is part of the symfony package
Definition at line 14 of file Response.php.
OAuth2\Response::__construct | ( | $parameters = array() , |
|
$statusCode = 200 , |
|||
$headers = array() |
|||
) |
Definition at line 66 of file Response.php.
OAuth2\Response::__toString | ( | ) |
Converts the response object to string containing all headers and the response content.
Definition at line 79 of file Response.php.
OAuth2\Response::addHttpHeaders | ( | array | $httpHeaders | ) |
Implements OAuth2\ResponseInterface.
Definition at line 160 of file Response.php.
OAuth2\Response::addParameters | ( | array | $parameters | ) |
Implements OAuth2\ResponseInterface.
Definition at line 135 of file Response.php.
|
protected |
Returns the build header line.
string | $name | The header name |
string | $value | The header value |
Definition at line 100 of file Response.php.
OAuth2\Response::getHttpHeader | ( | $name, | |
$default = null |
|||
) |
Definition at line 170 of file Response.php.
OAuth2\Response::getHttpHeaders | ( | ) |
Definition at line 165 of file Response.php.
OAuth2\Response::getParameter | ( | $name, | |
$default = null |
|||
) |
Definition at line 140 of file Response.php.
OAuth2\Response::getParameters | ( | ) |
Definition at line 125 of file Response.php.
OAuth2\Response::getResponseBody | ( | $format = 'json' | ) |
Definition at line 175 of file Response.php.
OAuth2\Response::getStatusCode | ( | ) |
Definition at line 105 of file Response.php.
OAuth2\Response::getStatusText | ( | ) |
Definition at line 120 of file Response.php.
OAuth2\Response::isClientError | ( | ) |
OAuth2\Response::isInformational | ( | ) |
OAuth2\Response::isInvalid | ( | ) |
OAuth2\Response::isRedirection | ( | ) |
OAuth2\Response::isServerError | ( | ) |
OAuth2\Response::isSuccessful | ( | ) |
OAuth2\Response::send | ( | $format = 'json' | ) |
Definition at line 194 of file Response.php.
Implements OAuth2\ResponseInterface.
Definition at line 218 of file Response.php.
OAuth2\Response::setHttpHeader | ( | $name, | |
$value | |||
) |
Definition at line 155 of file Response.php.
OAuth2\Response::setHttpHeaders | ( | array | $httpHeaders | ) |
Definition at line 150 of file Response.php.
OAuth2\Response::setParameter | ( | $name, | |
$value | |||
) |
Definition at line 145 of file Response.php.
OAuth2\Response::setParameters | ( | array | $parameters | ) |
Definition at line 130 of file Response.php.
OAuth2\Response::setRedirect | ( | $statusCode, | |
$url, | |||
$state = null , |
|||
$error = null , |
|||
$errorDescription = null , |
|||
$errorUri = null |
|||
) |
Implements OAuth2\ResponseInterface.
Definition at line 246 of file Response.php.
OAuth2\Response::setStatusCode | ( | $statusCode, | |
$text = null |
|||
) |
Definition at line 110 of file Response.php.
|
protected |
Definition at line 20 of file Response.php.
|
protected |
Definition at line 19 of file Response.php.
|
protected |
Definition at line 17 of file Response.php.
|
protected |
Definition at line 18 of file Response.php.
|
static |
Definition at line 22 of file Response.php.
OAuth2\Response::$version |
Definition at line 16 of file Response.php.