Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Description.php |
— | — | @@ -16,14 +16,16 @@ |
17 | 17 | */ |
18 | 18 | abstract class SMWDescription { |
19 | 19 | |
| 20 | + /** |
| 21 | + * @var array of SMWPrintRequest |
| 22 | + */ |
20 | 23 | protected $m_printreqs = array(); |
21 | | - // add code for managing printouts, including iteration |
22 | 24 | |
23 | 25 | /** |
24 | 26 | * Get the (possibly empty) array of all print requests that |
25 | 27 | * exist for the entities that fit this description. |
26 | 28 | * |
27 | | - * @return array |
| 29 | + * @return array of SMWPrintRequest |
28 | 30 | */ |
29 | 31 | public function getPrintRequests() { |
30 | 32 | return $this->m_printreqs; |
— | — | @@ -32,7 +34,7 @@ |
33 | 35 | /** |
34 | 36 | * Set the array of print requests completely. |
35 | 37 | * |
36 | | - * @param array $printrequests |
| 38 | + * @param array of SMWPrintRequest $printrequests |
37 | 39 | */ |
38 | 40 | public function setPrintRequests( array $printrequests ) { |
39 | 41 | $this->m_printreqs = $printrequests; |
— | — | @@ -68,6 +70,8 @@ |
69 | 71 | * over the canonical [[has location::\<q\>[[Paris]]\</q\>]]. |
70 | 72 | * |
71 | 73 | * @param boolean $asvalue |
| 74 | + * |
| 75 | + * @return string |
72 | 76 | */ |
73 | 77 | abstract public function getQueryString( $asvalue = false ); |
74 | 78 | |
— | — | @@ -193,8 +197,18 @@ |
194 | 198 | */ |
195 | 199 | class SMWClassDescription extends SMWDescription { |
196 | 200 | |
| 201 | + /** |
| 202 | + * @var array of SMWDIWikiPage |
| 203 | + */ |
197 | 204 | protected $m_diWikiPages; |
198 | 205 | |
| 206 | + /** |
| 207 | + * Constructor. |
| 208 | + * |
| 209 | + * @param mixed $content SMWDIWikiPage or array of SMWDIWikiPage |
| 210 | + * |
| 211 | + * @throws Exception |
| 212 | + */ |
199 | 213 | public function __construct( $content ) { |
200 | 214 | if ( $content instanceof SMWDIWikiPage ) { |
201 | 215 | $this->m_diWikiPages = array( $content ); |
— | — | @@ -205,10 +219,16 @@ |
206 | 220 | } |
207 | 221 | } |
208 | 222 | |
| 223 | + /** |
| 224 | + * @param SMWClassDescription $description |
| 225 | + */ |
209 | 226 | public function addDescription( SMWClassDescription $description ) { |
210 | 227 | $this->m_diWikiPages = array_merge( $this->m_diWikiPages, $description->getCategories() ); |
211 | 228 | } |
212 | 229 | |
| 230 | + /** |
| 231 | + * @return array of SMWDIWikiPage |
| 232 | + */ |
213 | 233 | public function getCategories() { |
214 | 234 | return $this->m_diWikiPages; |
215 | 235 | } |
— | — | @@ -285,12 +305,23 @@ |
286 | 306 | */ |
287 | 307 | class SMWConceptDescription extends SMWDescription { |
288 | 308 | |
| 309 | + /** |
| 310 | + * @var SMWDIWikiPage |
| 311 | + */ |
289 | 312 | protected $m_concept; |
290 | 313 | |
| 314 | + /** |
| 315 | + * Constructor. |
| 316 | + * |
| 317 | + * @param SMWDIWikiPage $concept |
| 318 | + */ |
291 | 319 | public function __construct( SMWDIWikiPage $concept ) { |
292 | 320 | $this->m_concept = $concept; |
293 | 321 | } |
294 | 322 | |
| 323 | + /** |
| 324 | + * @return SMWDIWikiPage |
| 325 | + */ |
295 | 326 | public function getConcept() { |
296 | 327 | return $this->m_concept; |
297 | 328 | } |
— | — | @@ -330,12 +361,23 @@ |
331 | 362 | */ |
332 | 363 | class SMWNamespaceDescription extends SMWDescription { |
333 | 364 | |
| 365 | + /** |
| 366 | + * @var integer |
| 367 | + */ |
334 | 368 | protected $m_namespace; |
335 | 369 | |
| 370 | + /** |
| 371 | + * Constructor. |
| 372 | + * |
| 373 | + * @param integer $namespace The namespace index |
| 374 | + */ |
336 | 375 | public function __construct( $namespace ) { |
337 | 376 | $this->m_namespace = $namespace; |
338 | 377 | } |
339 | 378 | |
| 379 | + /** |
| 380 | + * @return integer |
| 381 | + */ |
340 | 382 | public function getNamespace() { |
341 | 383 | return $this->m_namespace; |
342 | 384 | } |