| 1: | <?php declare(strict_types=1); |
| 2: | |
| 3: | namespace Salient\Contract\Core\Entity; |
| 4: | |
| 5: | /** |
| 6: | * @api |
| 7: | */ |
| 8: | interface Readable |
| 9: | { |
| 10: | /** |
| 11: | * Get readable properties |
| 12: | * |
| 13: | * Returning `["*"]` has the same effect as returning every `protected` |
| 14: | * property of the class. |
| 15: | * |
| 16: | * @return string[] |
| 17: | */ |
| 18: | public static function getReadableProperties(): array; |
| 19: | |
| 20: | /** |
| 21: | * Get the value of a property, or null if it is not set |
| 22: | * |
| 23: | * @return mixed |
| 24: | */ |
| 25: | public function __get(string $name); |
| 26: | |
| 27: | /** |
| 28: | * Check if a property is set |
| 29: | */ |
| 30: | public function __isset(string $name): bool; |
| 31: | } |
| 32: |