Class to represent an HTTP message. More...
Public Member Functions | |
| __construct ($platform, $scopes=null, $token=null, $expires=null) | |
| Class constructor. | |
| Platform | getPlatform () |
| Get platform. | |
| bool | load () |
| Load a nonce value from the database. | |
| bool | save () |
| Save a nonce value in the database. | |
| bool | hasScope ($scope='') |
| Check if a valid access token exists for a specific scope (or any scope if none specified). | |
| AccessToken | get ($scope='', $scopeOnly=false) |
| Obtain a valid access token for a scope. | |
Public Attributes | |
| string null | $token = null |
| Access token string. | |
| datetime null | $expires = null |
| Timestamp at which the token string expires. | |
| array | $scopes = array() |
| Scope(s) for which the access token is valid. | |
| int null | $created = null |
| Timestamp for when the object was created. | |
| int null | $updated = null |
| Timestamp for when the object was last updated. | |
Class to represent an HTTP message.
| __construct | ( | $platform, | |
$scopes = null, |
|||
$token = null, |
|||
$expires = null |
|||
| ) |
Class constructor.
| Platform | $platform | Platform |
| array | null | $scopes | Scopes for which the access token is valid |
| string | $token | Access token string |
| datetime | $expires | Time in seconds after which the token string will expire |
| AccessToken get | ( | $scope = '', |
|
$scopeOnly = false |
|||
| ) |
Obtain a valid access token for a scope.
| string | $scope | Access scope |
| bool | $scopeOnly | If true, a token is requested just for the specified scope |
| Platform getPlatform | ( | ) |
Get platform.
| bool hasScope | ( | $scope = '' | ) |
Check if a valid access token exists for a specific scope (or any scope if none specified).
| string | $scope | Access scope |
| bool load | ( | ) |
Load a nonce value from the database.
| bool save | ( | ) |
Save a nonce value in the database.
| int null $created = null |
Timestamp for when the object was created.
$created
| datetime null $expires = null |
Timestamp at which the token string expires.
$expires
| array $scopes = array() |
Scope(s) for which the access token is valid.
$scopes
| string null $token = null |
Access token string.
$token
| int null $updated = null |
Timestamp for when the object was last updated.
$updated