class Token extends OperatorResource implements Creatable, Retrievable, Token

Traits

Properties

$methods array
$expires DateTimeImmutable
$project Project
$catalog Catalog
$extras mixed
$user User
$issued DateTimeImmutable
$id string

Methods

populateFromResponse (ResponseInterface $response) : AbstractResource

All models which represent an API resource should be able to be populated from a {see ResponseInterface} object.

getId () : string

No description

hasExpired () : bool

Indicates whether the token has expired or not.

retrieve () : void

Retrieve details of the current resource from the remote API.

create (array $data) : Creatable

Create a new resource according to the configuration set in the options.

Details

populateFromResponse(ResponseInterface $response)

All models which represent an API resource should be able to be populated from a {see ResponseInterface} object.

Parameters

$response ResponseInterface

Return value

AbstractResource

Example code

$abstractResource = $token->populateFromResponse($response);

getId()

Return value

string

Example code

$string = $token->getId();

hasExpired()

Indicates whether the token has expired or not.

Return value

bool TRUE if the token has expired (and is invalid); FALSE otherwise.

Example code

$bool = $token->hasExpired();

retrieve()

Retrieve details of the current resource from the remote API.

Return value

void

Example code

$token->retrieve();

create(array $data)

Create a new resource according to the configuration set in the options.

Parameters

$data array {see \OpenStack\Identity\v3\Api::postTokens}

Return value

Creatable

Example code

$creatable = $token->create($data);