1 | <?php |
||
22 | class ModelObjNode extends BaseNode |
||
23 | { |
||
24 | /** |
||
25 | * @var EE_Base_Class |
||
26 | */ |
||
27 | protected $model_obj; |
||
28 | |||
29 | /** |
||
30 | * @var RelationNode[] |
||
31 | */ |
||
32 | protected $relation_nodes; |
||
33 | |||
34 | public function __construct($instance) |
||
38 | |||
39 | /** |
||
40 | * Creates a relation node for each relation of this model's relations. |
||
41 | * Does NOT call `discover` on them yet though. |
||
42 | * @since $VID:$ |
||
43 | * @throws \EE_Error |
||
44 | * @throws InvalidDataTypeException |
||
45 | * @throws InvalidInterfaceException |
||
46 | * @throws InvalidArgumentException |
||
47 | * @throws ReflectionException |
||
48 | */ |
||
49 | protected function discover() |
||
61 | |||
62 | |||
63 | /** |
||
64 | * Whether this item has already been initialized |
||
65 | */ |
||
66 | protected function isDiscovered() |
||
70 | |||
71 | /** |
||
72 | * @since $VID:$ |
||
73 | * @return boolean |
||
74 | */ |
||
75 | public function isComplete() |
||
82 | |||
83 | /** |
||
84 | * Triggers working on each child relation node that has work to do. |
||
85 | * @since $VID:$ |
||
86 | * @param $model_objects_to_identify |
||
87 | * @return int units of work done |
||
88 | */ |
||
89 | protected function work($model_objects_to_identify) |
||
104 | |||
105 | /** |
||
106 | * @since $VID:$ |
||
107 | * @return array |
||
108 | * @throws \EE_Error |
||
109 | * @throws InvalidDataTypeException |
||
110 | * @throws InvalidInterfaceException |
||
111 | * @throws InvalidArgumentException |
||
112 | * @throws ReflectionException |
||
113 | */ |
||
114 | public function toArray() |
||
130 | } |
||
131 | // End of file Visitor.php |
||
133 |