@@ -59,7 +59,7 @@ |
||
| 59 | 59 | * Constructor method. It only acquire current time and notify that cache is ready |
| 60 | 60 | * |
| 61 | 61 | * @param float $time Dispatcher time |
| 62 | - * @param Object $logger Logger, injected by dispatcher |
|
| 62 | + * @param Debug $logger Logger, injected by dispatcher |
|
| 63 | 63 | */ |
| 64 | 64 | final public function __construct($time, $logger) { |
| 65 | 65 | |
@@ -47,6 +47,7 @@ discard block |
||
| 47 | 47 | * It does nothing special: called at boot time, only notify that events |
| 48 | 48 | * are ready. |
| 49 | 49 | * |
| 50 | + * @param Debug $logger |
|
| 50 | 51 | * @return null |
| 51 | 52 | */ |
| 52 | 53 | final public function __construct($logger) { |
@@ -66,7 +67,7 @@ discard block |
||
| 66 | 67 | * @param string $callback Callback (or callback class) |
| 67 | 68 | * @param string $method (optional) callback method |
| 68 | 69 | * |
| 69 | - * @return Object $this |
|
| 70 | + * @return Events $this |
|
| 70 | 71 | */ |
| 71 | 72 | final public function add($event, $callback, $method=null) { |
| 72 | 73 | |
@@ -57,8 +57,8 @@ discard block |
||
| 57 | 57 | * Set $header with a $value. If value is null, only $header will be used |
| 58 | 58 | * |
| 59 | 59 | * @param string $header Header name |
| 60 | - * @param mixed $value Header value (if not included in $header) |
|
| 61 | - * @return Object $this |
|
| 60 | + * @param string $value Header value (if not included in $header) |
|
| 61 | + * @return Header $this |
|
| 62 | 62 | */ |
| 63 | 63 | final public function set($header, $value=null) { |
| 64 | 64 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | /** |
| 87 | 87 | * Free recorded headers (re-init array) |
| 88 | 88 | * |
| 89 | - * @return Object $this |
|
| 89 | + * @return Header $this |
|
| 90 | 90 | */ |
| 91 | 91 | final public function free() { |
| 92 | 92 | |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | * Shortcut to set client cache headers |
| 232 | 232 | * |
| 233 | 233 | * @param integer $ttl Cache time to live |
| 234 | - * @return Object $this |
|
| 234 | + * @return Header $this |
|
| 235 | 235 | */ |
| 236 | 236 | public function setClientCache($ttl) { |
| 237 | 237 | |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | * |
| 256 | 256 | * @param string $type Content type |
| 257 | 257 | * @param string $charset Charset |
| 258 | - * @return Object $this |
|
| 258 | + * @return Header $this |
|
| 259 | 259 | */ |
| 260 | 260 | public function setContentType($type, $charset=null) { |
| 261 | 261 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | * |
| 61 | 61 | * @param string $service The service name |
| 62 | 62 | * |
| 63 | - * @return Object $this |
|
| 63 | + * @return ObjectRoute $this |
|
| 64 | 64 | */ |
| 65 | 65 | public function setService($service) { |
| 66 | 66 | |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | * |
| 86 | 86 | * @param string $type |
| 87 | 87 | * |
| 88 | - * @return Object $this |
|
| 88 | + * @return ObjectRoute $this |
|
| 89 | 89 | */ |
| 90 | 90 | public function setType($type) { |
| 91 | 91 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | * |
| 114 | 114 | * @param string $target |
| 115 | 115 | * |
| 116 | - * @return Object $this |
|
| 116 | + * @return ObjectRoute $this |
|
| 117 | 117 | */ |
| 118 | 118 | public function setTarget($target) { |
| 119 | 119 | |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | * @param string $header Header name |
| 240 | 240 | * @param string $value Header content (optional) |
| 241 | 241 | * |
| 242 | - * @return ObjectRequest $this |
|
| 242 | + * @return ObjectRoute $this |
|
| 243 | 243 | */ |
| 244 | 244 | public function setHeader($header, $value=null) { |
| 245 | 245 | |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | * |
| 291 | 291 | * @param array $headers Headers array |
| 292 | 292 | * |
| 293 | - * @return ObjectRequest $this |
|
| 293 | + * @return ObjectRoute $this |
|
| 294 | 294 | */ |
| 295 | 295 | public function setHeaders($headers) { |
| 296 | 296 | |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | /** |
| 304 | 304 | * Unset headers |
| 305 | 305 | * |
| 306 | - * @return ObjectRequest $this |
|
| 306 | + * @return ObjectRoute $this |
|
| 307 | 307 | */ |
| 308 | 308 | public function unsetHeaders() { |
| 309 | 309 | |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | /** |
| 328 | 328 | * Set extra parameter |
| 329 | 329 | * |
| 330 | - * @return ObjectRequest $this |
|
| 330 | + * @return ObjectRoute $this |
|
| 331 | 331 | */ |
| 332 | 332 | public function setParameter($parameter, $value=null) { |
| 333 | 333 | |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | * @param array $attributes array og attributes that service expects |
| 261 | 261 | * @param array $parameters array of parameters that service expects |
| 262 | 262 | * |
| 263 | - * @return Object $this |
|
| 263 | + * @return Service $this |
|
| 264 | 264 | */ |
| 265 | 265 | final public function expects($method, $attributes, $parameters=array()) { |
| 266 | 266 | |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | * @param array $attributes array og attributes that service likes |
| 281 | 281 | * @param array $parameters array of parameters that service likes |
| 282 | 282 | * |
| 283 | - * @return Object $this |
|
| 283 | + * @return Service $this |
|
| 284 | 284 | */ |
| 285 | 285 | final public function likes($method, $attributes, $parameters=array()) { |
| 286 | 286 | |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | * |
| 307 | 307 | * @param string $methods HTTP methods, comma separated |
| 308 | 308 | * |
| 309 | - * @return Object $this |
|
| 309 | + * @return Service $this |
|
| 310 | 310 | */ |
| 311 | 311 | final public function setSupportedMethods($methods) { |
| 312 | 312 | |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | * Set service content type |
| 332 | 332 | * |
| 333 | 333 | * @param string $type Content Type |
| 334 | - * @return Object $this |
|
| 334 | + * @return Service $this |
|
| 335 | 335 | */ |
| 336 | 336 | final public function setContentType($type) { |
| 337 | 337 | |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | * |
| 358 | 358 | * @param string $charset Charset |
| 359 | 359 | * |
| 360 | - * @return Object $this |
|
| 360 | + * @return Service $this |
|
| 361 | 361 | */ |
| 362 | 362 | final public function setCharset($charset) { |
| 363 | 363 | |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | * Set success status code |
| 383 | 383 | * |
| 384 | 384 | * @param integer $code HTTP status code (in case of success) |
| 385 | - * @return Object $this |
|
| 385 | + * @return Service $this |
|
| 386 | 386 | */ |
| 387 | 387 | final public function setStatusCode($code) { |
| 388 | 388 | |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | * @param string $header Header name |
| 434 | 434 | * @param string $value Header content (optional) |
| 435 | 435 | * |
| 436 | - * @return Object $this |
|
| 436 | + * @return Service $this |
|
| 437 | 437 | */ |
| 438 | 438 | final public function setHeader($header, $value=null) { |
| 439 | 439 | |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | * |
| 485 | 485 | * @param array $headers Headers array |
| 486 | 486 | * |
| 487 | - * @return Object $this |
|
| 487 | + * @return Service $this |
|
| 488 | 488 | */ |
| 489 | 489 | final public function setHeaders($headers) { |
| 490 | 490 | |
@@ -497,7 +497,7 @@ discard block |
||
| 497 | 497 | /** |
| 498 | 498 | * Unset headers |
| 499 | 499 | * |
| 500 | - * @return Object $this |
|
| 500 | + * @return Service $this |
|
| 501 | 501 | */ |
| 502 | 502 | final public function unsetHeaders() { |
| 503 | 503 | |
@@ -521,7 +521,7 @@ discard block |
||
| 521 | 521 | /** |
| 522 | 522 | * Get service-supported HTTP methods |
| 523 | 523 | * |
| 524 | - * @return array Headers array |
|
| 524 | + * @return string Headers array |
|
| 525 | 525 | */ |
| 526 | 526 | final public function getSupportedMethods() { |
| 527 | 527 | |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | /** |
| 556 | 556 | * Return the callable class method that reflect the requested one |
| 557 | 557 | * |
| 558 | - * @return array Headers array |
|
| 558 | + * @return string Headers array |
|
| 559 | 559 | */ |
| 560 | 560 | final public function getCallableMethod($method) { |
| 561 | 561 | |
@@ -375,7 +375,7 @@ discard block |
||
| 375 | 375 | /** |
| 376 | 376 | * Dispatcher working method |
| 377 | 377 | * |
| 378 | - * @return mixed |
|
| 378 | + * @return string |
|
| 379 | 379 | */ |
| 380 | 380 | final public function dispatch() { |
| 381 | 381 | |
@@ -696,7 +696,7 @@ discard block |
||
| 696 | 696 | /** |
| 697 | 697 | * Return dispatcher baseurl, no matter the request |
| 698 | 698 | * |
| 699 | - * @return uri The baseurl |
|
| 699 | + * @return string The baseurl |
|
| 700 | 700 | */ |
| 701 | 701 | private function urlGetAbsolute($service=null) { |
| 702 | 702 | |
@@ -845,6 +845,9 @@ discard block |
||
| 845 | 845 | |
| 846 | 846 | } |
| 847 | 847 | |
| 848 | + /** |
|
| 849 | + * @return ObjectResultInterface |
|
| 850 | + */ |
|
| 848 | 851 | private function runService(ObjectRequest $request, ObjectRoute $route) { |
| 849 | 852 | |
| 850 | 853 | $method = $request->getMethod(); |
@@ -977,7 +980,7 @@ discard block |
||
| 977 | 980 | /** |
| 978 | 981 | * Route request handling ObjectResult hooks |
| 979 | 982 | * |
| 980 | - * @param ObjectResult $route An implementation of ObjectResultInterface |
|
| 983 | + * @param ObjectResultInterface $route An implementation of ObjectResultInterface |
|
| 981 | 984 | * @return string Content (stuff that will go on screen) |
| 982 | 985 | */ |
| 983 | 986 | private function route(ObjectResultInterface $route) { |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | * |
| 117 | 117 | * @param bool $bool |
| 118 | 118 | * |
| 119 | - * @return Object $this |
|
| 119 | + * @return XML $this |
|
| 120 | 120 | */ |
| 121 | 121 | final public function setIncludeHeader($bool) { |
| 122 | 122 | |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | * |
| 132 | 132 | * @param int $int |
| 133 | 133 | * |
| 134 | - * @return Object $this |
|
| 134 | + * @return XML $this |
|
| 135 | 135 | */ |
| 136 | 136 | final public function setCaseFolding($int) { |
| 137 | 137 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | * |
| 147 | 147 | * @param int $int |
| 148 | 148 | * |
| 149 | - * @return Object $this |
|
| 149 | + * @return XML $this |
|
| 150 | 150 | */ |
| 151 | 151 | final public function setSkipWhite($int) { |
| 152 | 152 | |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | * |
| 162 | 162 | * @param string $encoding |
| 163 | 163 | * |
| 164 | - * @return Object $this |
|
| 164 | + * @return XML $this |
|
| 165 | 165 | */ |
| 166 | 166 | final public function setEncoding($encoding) { |
| 167 | 167 | |
@@ -219,6 +219,7 @@ discard block |
||
| 219 | 219 | /** |
| 220 | 220 | * encode XML string into array |
| 221 | 221 | * |
| 222 | + * @param string $xml |
|
| 222 | 223 | * @return array |
| 223 | 224 | */ |
| 224 | 225 | public function decode($xml, $encoding=null) { |
@@ -306,6 +307,7 @@ discard block |
||
| 306 | 307 | /** |
| 307 | 308 | * Get element childs (if any) |
| 308 | 309 | * |
| 310 | + * @param integer $i |
|
| 309 | 311 | * @return array |
| 310 | 312 | */ |
| 311 | 313 | private function getChilds(&$i) { |