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