1 | <?php |
||
27 | class PhpProject |
||
28 | { |
||
29 | /** |
||
30 | * Document properties |
||
31 | * |
||
32 | * @var DocumentProperties |
||
33 | */ |
||
34 | private $properties; |
||
35 | |||
36 | /** |
||
37 | * Document informations |
||
38 | * |
||
39 | * @var DocumentInformations |
||
40 | */ |
||
41 | private $informations; |
||
42 | |||
43 | /** |
||
44 | * Collection of task objects |
||
45 | * |
||
46 | * @var Task[] |
||
47 | */ |
||
48 | private $taskCollection = array(); |
||
49 | |||
50 | /** |
||
51 | * Collection of resource objects |
||
52 | * |
||
53 | * @var Resource[] |
||
54 | */ |
||
55 | private $resourceCollection = array(); |
||
56 | |||
57 | /** |
||
58 | * Create a new PHPProject |
||
59 | */ |
||
60 | 23 | public function __construct() |
|
67 | |||
68 | //=============================================== |
||
69 | // Document Properties |
||
70 | //=============================================== |
||
71 | /** |
||
72 | * Get properties |
||
73 | * |
||
74 | * @return PHPProject_DocumentProperties |
||
75 | */ |
||
76 | 3 | public function getProperties() |
|
80 | |||
81 | /** |
||
82 | * Set properties |
||
83 | * |
||
84 | * @param PHPProject_DocumentProperties $pValue |
||
85 | */ |
||
86 | 1 | public function setProperties(DocumentProperties $pValue) |
|
91 | |||
92 | //=============================================== |
||
93 | // Document Informations |
||
94 | //=============================================== |
||
95 | /** |
||
96 | * Get informations |
||
97 | * |
||
98 | * @return DocumentInformations |
||
99 | */ |
||
100 | 3 | public function getInformations() |
|
104 | |||
105 | /** |
||
106 | * Set informations |
||
107 | * |
||
108 | * @param PHPProject_DocumentProperties $pValue |
||
109 | */ |
||
110 | 1 | public function setInformations(DocumentInformations $pValue) |
|
115 | |||
116 | //=============================================== |
||
117 | // Resources |
||
118 | //=============================================== |
||
119 | /** |
||
120 | * Create a resource |
||
121 | * |
||
122 | * @return Resource |
||
123 | * @throws \Exception |
||
124 | */ |
||
125 | 7 | public function createResource() |
|
131 | |||
132 | /** |
||
133 | * Get resource count |
||
134 | * |
||
135 | * @return int |
||
136 | */ |
||
137 | 3 | public function getResourceCount() |
|
141 | |||
142 | /** |
||
143 | * Get all resources |
||
144 | * |
||
145 | * @return \PhpOffice\PhpProject\Resource[] |
||
146 | */ |
||
147 | 5 | public function getAllResources() |
|
151 | |||
152 | /** |
||
153 | * Get active resource |
||
154 | * |
||
155 | * @return Resource|null |
||
156 | */ |
||
157 | 1 | public function getActiveResource() |
|
164 | |||
165 | /** |
||
166 | * Get resource from index |
||
167 | * |
||
168 | * @return Resource|null |
||
169 | */ |
||
170 | 4 | public function getResourceFromIndex($pIndex) |
|
179 | |||
180 | //=============================================== |
||
181 | // Tasks |
||
182 | //=============================================== |
||
183 | /** |
||
184 | * Create a task |
||
185 | * |
||
186 | * @return Task |
||
187 | * @throws \Exception |
||
188 | */ |
||
189 | 9 | public function createTask() |
|
195 | |||
196 | /** |
||
197 | * Get task count |
||
198 | * |
||
199 | * @return int |
||
200 | */ |
||
201 | 3 | public function getTaskCount() |
|
205 | |||
206 | /** |
||
207 | * Get all tasks |
||
208 | * |
||
209 | * @return Task[] |
||
210 | */ |
||
211 | 5 | public function getAllTasks() |
|
215 | |||
216 | /** |
||
217 | * Get active task |
||
218 | * |
||
219 | * @return Task |
||
220 | */ |
||
221 | 1 | public function getActiveTask() |
|
228 | |||
229 | /** |
||
230 | * Get task from index |
||
231 | * |
||
232 | * @return Task|null |
||
233 | */ |
||
234 | 4 | public function getTaskFromIndex($pIndex, Task $oTaskParent = null) |
|
255 | |||
256 | /** |
||
257 | * Remove task by index |
||
258 | * |
||
259 | * @param int $pIndex Active task index |
||
260 | * @throws \Exception |
||
261 | */ |
||
262 | 2 | public function removeTaskByIndex($pIndex = 0) |
|
270 | } |
||
271 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.