2017-01-13 19:50:35 +01:00
|
|
|
<?php
|
2017-04-21 05:34:20 +02:00
|
|
|
/**
|
|
|
|
* @api {OBJECT} APIKey APIKey
|
2017-06-28 15:02:54 +02:00
|
|
|
* @apiVersion 4.1.0
|
2017-04-21 05:34:20 +02:00
|
|
|
* @apiGroup Data Structures
|
|
|
|
* @apiParam {String} name Name of the APIKey.
|
|
|
|
* @apiParam {String} token Token of the APIKey.
|
|
|
|
*/
|
2017-01-13 19:50:35 +01:00
|
|
|
|
|
|
|
class APIKey extends DataStore {
|
|
|
|
const TABLE = 'apikey';
|
|
|
|
|
|
|
|
public static function getProps() {
|
|
|
|
return [
|
|
|
|
'name',
|
2017-01-13 21:06:49 +01:00
|
|
|
'token'
|
2017-01-13 19:50:35 +01:00
|
|
|
];
|
|
|
|
}
|
2017-01-15 05:36:04 +01:00
|
|
|
|
2017-01-13 19:50:35 +01:00
|
|
|
public function toArray() {
|
|
|
|
return [
|
|
|
|
'name' => $this->name,
|
2017-01-13 21:06:49 +01:00
|
|
|
'token' => $this->token
|
2017-01-13 19:50:35 +01:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|