opensupports/server/models/APIKey.php

26 lines
508 B
PHP
Raw Normal View History

<?php
2017-04-21 05:34:20 +02:00
/**
* @api {OBJECT} APIKey APIKey
* @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.
*/
class APIKey extends DataStore {
const TABLE = 'apikey';
public static function getProps() {
return [
'name',
'token'
];
}
2017-01-15 05:36:04 +01:00
public function toArray() {
return [
'name' => $this->name,
'token' => $this->token
];
}
}