1 | <?php |
||
23 | class NodeGroupDao |
||
24 | { |
||
25 | /** |
||
26 | * @since $VID:$ |
||
27 | * @return mixed|void |
||
28 | */ |
||
29 | public function generateGroupCode() |
||
33 | |||
34 | /** |
||
35 | * Gets the string we put in front of the WP Option name used to store the jobs. |
||
36 | * @since $VID:$ |
||
37 | * @return string |
||
38 | */ |
||
39 | private function getOptionPrefix() |
||
43 | |||
44 | /** |
||
45 | * @since $VID:$ |
||
46 | * @param $code |
||
47 | * @return ModelObjNode[] |
||
48 | * @throws UnexpectedEntityException |
||
49 | */ |
||
50 | public function getModelObjNodesInGroup($code) |
||
63 | |||
64 | /** |
||
65 | * Gets an array indicating what database rows are contained in the job. |
||
66 | * Each top-level key is a model name, and its value is an array of IDs. |
||
67 | * @since $VID:$ |
||
68 | * @param ModelObjNode[] $model_obj_nodes |
||
69 | * @return array |
||
70 | * @throws EE_Error |
||
71 | * @throws InvalidDataTypeException |
||
72 | * @throws InvalidInterfaceException |
||
73 | * @throws InvalidArgumentException |
||
74 | * @throws ReflectionException |
||
75 | */ |
||
76 | public function getModelsAndIdsContainedIn($model_obj_nodes) |
||
84 | |||
85 | /** |
||
86 | * Gets an array indicating what database rows are contained in the job. |
||
87 | * Each top-level key is a model name, and its value is an array of IDs. |
||
88 | * @since $VID:$ |
||
89 | * @param string $code |
||
90 | * @return array |
||
91 | * @throws EE_Error |
||
92 | * @throws InvalidArgumentException |
||
93 | * @throws InvalidDataTypeException |
||
94 | * @throws InvalidInterfaceException |
||
95 | * @throws ReflectionException |
||
96 | * @throws UnexpectedEntityException |
||
97 | */ |
||
98 | public function getModelsAndIdsFromGroup($code) |
||
103 | |||
104 | /** |
||
105 | * Persists the ModelObjNodes for future requests, using the code for reference. |
||
106 | * @since $VID:$ |
||
107 | * @param ModelObjNode[] $model_obj_nodes |
||
108 | * @param string $code |
||
109 | * @return bool |
||
110 | */ |
||
111 | public function persistModelObjNodesGroup($model_obj_nodes, $code) |
||
120 | |||
121 | /** |
||
122 | * Forgets about the group of ModelObjNodes. Doesn't delete the rows in the database they reference though. |
||
123 | * @since $VID:$ |
||
124 | * @param $code |
||
125 | * @return bool |
||
126 | */ |
||
127 | public function deleteModelObjNodesInGroup($code) |
||
131 | } |
||
132 | // End of file NodeGroupDao.php |
||
134 |