ApiKey model implementation

license New BSD License
link for the canonical source repository
author Ingo Walz
category Zend
package Zend_Service
subpackage ZendServerAPI

 Methods

Constructor for ApiKey model class

__construct(string $name, string $key, int $state) 

Parameters

$name

string

Name of the api key

$key

string

The api key value

$state

int

State of the api key

Get the Key value

getKey() : string

Returns

string

Get name of the API Key

getName() : string

Returns

string

Get the state of the current API Key

getState() : int

Returns

int

Set Key value

setKey(string $key) 

Parameters

$key

string

Set the name of the API Key

setName(string $name) 

Parameters

$name

string

Apikey name

Set READ or FULL state for API Key

setState(int $state) 

Parameters

$state

int

1 | 2

Exceptions

\InvalidArgumentException

 Properties

 

$key : string
 

$name : string
 

$state : \ZendService\ZendServerAPI\FULL | \ZendService\ZendServerAPI\READONLY

 Constants

 

Access to all methods

FULL : int
 

Only access to READ methods

READONLY : int