1 | <?php |
||
11 | abstract class Type |
||
12 | { |
||
13 | /** |
||
14 | * The type object |
||
15 | * @var object |
||
16 | */ |
||
17 | protected $object; |
||
18 | |||
19 | /** |
||
20 | * Type object property aliases |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $objectAliases = [ |
||
24 | 'id' => 'name', |
||
25 | 'slug' => 'name', |
||
26 | 'one' => 'labels.singular_name', |
||
27 | 'many' => 'labels.name', |
||
28 | ]; |
||
29 | |||
30 | /** |
||
31 | * Get the type object. |
||
32 | * |
||
33 | * @return object |
||
34 | */ |
||
35 | public function object() |
||
39 | |||
40 | /** |
||
41 | * Magic Getter. |
||
42 | * |
||
43 | * @param string $property Accessed property name |
||
44 | * |
||
45 | * @return mixed |
||
46 | */ |
||
47 | public function __get($property) |
||
59 | |||
60 | /** |
||
61 | * Magic Isset Check. |
||
62 | * |
||
63 | * @param string $property Queried property name |
||
64 | * |
||
65 | * @return boolean |
||
66 | */ |
||
67 | public function __isset($property) |
||
71 | } |
||
72 |