| 1 | <?php |
||
| 7 | class App |
||
| 8 | { |
||
| 9 | /** @var int */ |
||
| 10 | public $id; |
||
| 11 | |||
| 12 | /** @var string */ |
||
| 13 | public $key; |
||
| 14 | |||
| 15 | /** @var string */ |
||
| 16 | public $secret; |
||
| 17 | |||
| 18 | /** @var string|null */ |
||
| 19 | public $name; |
||
| 20 | |||
| 21 | /** @var string|null */ |
||
| 22 | public $host; |
||
| 23 | |||
| 24 | /** @var int|null */ |
||
| 25 | public $capacity = null; |
||
| 26 | |||
| 27 | /** @var bool */ |
||
| 28 | public $clientMessagesEnabled = false; |
||
| 29 | |||
| 30 | /** @var bool */ |
||
| 31 | public $statisticsEnabled = true; |
||
| 32 | |||
| 33 | public static function findById($appId) |
||
| 37 | |||
| 38 | public static function findByKey(string $appKey): ?self |
||
| 42 | |||
| 43 | public static function findBySecret(string $appSecret): ?self |
||
| 47 | |||
| 48 | public function __construct($appId, string $appKey, string $appSecret) |
||
| 64 | |||
| 65 | public function setName(string $appName) |
||
| 71 | |||
| 72 | public function setHost(string $host) |
||
| 78 | |||
| 79 | public function enableClientMessages(bool $enabled = true) |
||
| 85 | |||
| 86 | public function setCapacity($capacity) |
||
| 92 | |||
| 93 | public function enableStatistics(bool $enabled = true) |
||
| 99 | } |
||
| 100 |