| 1 | <?php |
||
| 14 | trait ResourceBehaviour |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * ID of resource |
||
| 18 | * |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $id; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Type of resource |
||
| 25 | * |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | protected $type; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Get ID of resource |
||
| 32 | * |
||
| 33 | * @return string |
||
| 34 | */ |
||
| 35 | 15 | public function getId(): string |
|
| 39 | |||
| 40 | /** |
||
| 41 | * Get type of resource |
||
| 42 | * |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | 15 | public function getType(): string |
|
| 49 | |||
| 50 | /** |
||
| 51 | * Cast resource to an array |
||
| 52 | * |
||
| 53 | * @return array |
||
| 54 | */ |
||
| 55 | 7 | protected function resourceToArray(): array |
|
| 62 | } |