@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | * - castingHelper: the casting helper for casting the field (e.g. "return new Varchar($fieldName)") |
234 | 234 | * |
235 | 235 | * @param string $field |
236 | - * @return array |
|
236 | + * @return string |
|
237 | 237 | */ |
238 | 238 | public function castingHelperPair($field) { |
239 | 239 | Deprecation::notice('2.5', 'use castingHelper() instead'); |
@@ -485,6 +485,7 @@ discard block |
||
485 | 485 | |
486 | 486 | /** |
487 | 487 | * Return the value of a field in an SQL-safe format. |
488 | + * @param string $field |
|
488 | 489 | */ |
489 | 490 | public function SQL_val($field, $arguments = null, $cache = true) { |
490 | 491 | return Convert::raw2sql($this->RAW_val($field, $arguments, $cache)); |
@@ -492,6 +493,7 @@ discard block |
||
492 | 493 | |
493 | 494 | /** |
494 | 495 | * Return the value of a field in a JavaScript-save format. |
496 | + * @param string $field |
|
495 | 497 | */ |
496 | 498 | public function JS_val($field, $arguments = null, $cache = true) { |
497 | 499 | return Convert::raw2js($this->RAW_val($field, $arguments, $cache)); |
@@ -499,6 +501,7 @@ discard block |
||
499 | 501 | |
500 | 502 | /** |
501 | 503 | * Return the value of a field escaped suitable to be inserted into an XML node attribute. |
504 | + * @param string $field |
|
502 | 505 | */ |
503 | 506 | public function ATT_val($field, $arguments = null, $cache = true) { |
504 | 507 | return Convert::raw2att($this->RAW_val($field, $arguments, $cache)); |
@@ -509,7 +512,6 @@ discard block |
||
509 | 512 | /** |
510 | 513 | * Get an array of XML-escaped values by field name |
511 | 514 | * |
512 | - * @param array $elements an array of field names |
|
513 | 515 | * @return array |
514 | 516 | */ |
515 | 517 | public function getXMLValues($fields) { |
@@ -334,8 +334,8 @@ discard block |
||
334 | 334 | /** |
335 | 335 | * Extracts the response body and headers from a full curl response |
336 | 336 | * |
337 | - * @param curl_handle $ch The curl handle for the request |
|
338 | - * @param string $rawResponse The raw response text |
|
337 | + * @param resource $ch The curl handle for the request |
|
338 | + * @param string $rawHeaders |
|
339 | 339 | * |
340 | 340 | * @return RestfulService_Response The response object |
341 | 341 | */ |
@@ -391,7 +391,8 @@ discard block |
||
391 | 391 | |
392 | 392 | /** |
393 | 393 | * Returns a full request url |
394 | - * @param string |
|
394 | + * @param string |
|
395 | + * @param string $subURL |
|
395 | 396 | */ |
396 | 397 | public function getAbsoluteRequestURL($subURL) { |
397 | 398 | $url = $this->baseURL . $subURL; // Url for the request |
@@ -631,7 +632,7 @@ discard block |
||
631 | 632 | * get the cached response object. This allows you to access the cached |
632 | 633 | * eaders, not just the cached body. |
633 | 634 | * |
634 | - * @return RestfulSerivice_Response The cached response object |
|
635 | + * @return boolean The cached response object |
|
635 | 636 | */ |
636 | 637 | public function getCachedResponse() { |
637 | 638 | return $this->cachedResponse; |
@@ -300,6 +300,9 @@ discard block |
||
300 | 300 | return new SSViewer($templates); |
301 | 301 | } |
302 | 302 | |
303 | + /** |
|
304 | + * @param string $action |
|
305 | + */ |
|
303 | 306 | public function hasAction($action) { |
304 | 307 | return parent::hasAction($action) || $this->hasActionTemplate($action); |
305 | 308 | } |
@@ -363,7 +366,7 @@ discard block |
||
363 | 366 | * by {@link getViewer()}. |
364 | 367 | * |
365 | 368 | * @param array $params Key-value array for custom template variables (Optional) |
366 | - * @return string Parsed template content |
|
369 | + * @return HTMLText Parsed template content |
|
367 | 370 | */ |
368 | 371 | public function render($params = null) { |
369 | 372 | $template = $this->getViewer($this->getAction()); |
@@ -388,6 +391,7 @@ discard block |
||
388 | 391 | /** |
389 | 392 | * Returns the current controller |
390 | 393 | * @returns Controller |
394 | + * @return Controller |
|
391 | 395 | */ |
392 | 396 | public static function curr() { |
393 | 397 | if(Controller::$controller_stack) { |
@@ -519,7 +523,7 @@ discard block |
||
519 | 523 | |
520 | 524 | /** |
521 | 525 | * Tests whether a redirection has been requested. |
522 | - * @return string If redirect() has been called, it will return the URL redirected to. Otherwise, it will |
|
526 | + * @return boolean If redirect() has been called, it will return the URL redirected to. Otherwise, it will |
|
523 | 527 | * return null; |
524 | 528 | */ |
525 | 529 | public function redirectedTo() { |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * @param string|callable $code Either a string that can evaluate to an expression |
100 | 100 | * to rewrite links (depreciated), or a callable that takes a single |
101 | 101 | * parameter and returns the rewritten URL |
102 | - * @return The content with all links rewritten as per the logic specified in $code |
|
102 | + * @return string content with all links rewritten as per the logic specified in $code |
|
103 | 103 | */ |
104 | 104 | public static function urlRewriter($content, $code) { |
105 | 105 | if(!is_callable($code)) { |
@@ -243,6 +243,9 @@ discard block |
||
243 | 243 | return count($result) ? $result : null; |
244 | 244 | } |
245 | 245 | |
246 | + /** |
|
247 | + * @param string $content |
|
248 | + */ |
|
246 | 249 | public static function getLinksIn($content) { |
247 | 250 | return self::findByTagAndAttribute($content, array("a" => "href")); |
248 | 251 | } |
@@ -285,6 +288,7 @@ discard block |
||
285 | 288 | |
286 | 289 | /** |
287 | 290 | * Set the maximum age of this page in web caches, in seconds |
291 | + * @param integer $age |
|
288 | 292 | */ |
289 | 293 | public static function set_cache_age($age) { |
290 | 294 | self::$cache_age = $age; |
@@ -296,11 +300,17 @@ discard block |
||
296 | 300 | self::$modification_date = $timestamp; |
297 | 301 | } |
298 | 302 | |
303 | + /** |
|
304 | + * @param integer $timestamp |
|
305 | + */ |
|
299 | 306 | public static function register_modification_timestamp($timestamp) { |
300 | 307 | if($timestamp > self::$modification_date) |
301 | 308 | self::$modification_date = $timestamp; |
302 | 309 | } |
303 | 310 | |
311 | + /** |
|
312 | + * @param string $etag |
|
313 | + */ |
|
304 | 314 | public static function register_etag($etag) { |
305 | 315 | self::$etag = $etag; |
306 | 316 | } |
@@ -313,6 +323,7 @@ discard block |
||
313 | 323 | * |
314 | 324 | * @param SS_HTTPResponse The SS_HTTPResponse object to augment. Omitted the argument or passing a string is |
315 | 325 | * deprecated; in these cases, the headers are output directly. |
326 | + * @param SS_HTTPResponse $body |
|
316 | 327 | */ |
317 | 328 | public static function add_cache_headers($body = null) { |
318 | 329 | $cacheAge = self::$cache_age; |
@@ -331,14 +331,13 @@ discard block |
||
331 | 331 | * of a particular type is injected, and what items should be injected |
332 | 332 | * for those properties / methods. |
333 | 333 | * |
334 | - * @param type $class |
|
334 | + * @param string $class |
|
335 | 335 | * The class to set a mapping for |
336 | - * @param type $property |
|
336 | + * @param string $property |
|
337 | 337 | * The property to set the mapping for |
338 | - * @param type $injectType |
|
339 | - * The registered type that will be injected |
|
340 | 338 | * @param string $injectVia |
341 | 339 | * Whether to inject by setting a property or calling a setter |
340 | + * @param string $toInject |
|
342 | 341 | */ |
343 | 342 | public function setInjectMapping($class, $property, $toInject, $injectVia = 'property') { |
344 | 343 | $mapping = isset($this->injectMap[$class]) ? $this->injectMap[$class] : array(); |
@@ -358,7 +357,7 @@ discard block |
||
358 | 357 | * |
359 | 358 | * @param string $property |
360 | 359 | * the name of the property |
361 | - * @param object $object |
|
360 | + * @param string $object |
|
362 | 361 | * the object to be set |
363 | 362 | */ |
364 | 363 | public function addAutoProperty($property, $object) { |
@@ -452,7 +451,7 @@ discard block |
||
452 | 451 | * The name of the service to update the definition for |
453 | 452 | * @param string $property |
454 | 453 | * The name of the property to update. |
455 | - * @param mixed $value |
|
454 | + * @param string $value |
|
456 | 455 | * The value to set |
457 | 456 | * @param boolean $append |
458 | 457 | * Whether to append (the default) when the property is an array |
@@ -720,6 +719,7 @@ discard block |
||
720 | 719 | * |
721 | 720 | * Will recursively call hasService for each depth of dotting |
722 | 721 | * |
722 | + * @param string $name |
|
723 | 723 | * @return string |
724 | 724 | * The name of the service (as it might be different from the one passed in) |
725 | 725 | */ |
@@ -764,6 +764,8 @@ discard block |
||
764 | 764 | * Register a service with an explicit name |
765 | 765 | * |
766 | 766 | * @deprecated since 3.1.1 |
767 | + * @param string $name |
|
768 | + * @param stdClass $service |
|
767 | 769 | */ |
768 | 770 | public function registerNamedService($name, $service) { |
769 | 771 | return $this->registerService($service, $name); |
@@ -895,8 +897,6 @@ discard block |
||
895 | 897 | * |
896 | 898 | * @param string $name |
897 | 899 | * Name of the class to create an object of |
898 | - * @param array $args |
|
899 | - * Arguments to pass to the constructor |
|
900 | 900 | * @return mixed |
901 | 901 | */ |
902 | 902 | public function createWithArgs($name, $constructorArgs) { |
@@ -121,6 +121,7 @@ discard block |
||
121 | 121 | |
122 | 122 | /** |
123 | 123 | * Set the DataModel for this request. |
124 | + * @param DataModel $model |
|
124 | 125 | */ |
125 | 126 | public function setDataModel($model) { |
126 | 127 | $this->model = $model; |
@@ -238,6 +239,9 @@ discard block |
||
238 | 239 | return $this; |
239 | 240 | } |
240 | 241 | |
242 | + /** |
|
243 | + * @param SS_HTTPRequest $request |
|
244 | + */ |
|
241 | 245 | protected function findAction($request) { |
242 | 246 | $handlerClass = ($this->class) ? $this->class : get_class($this); |
243 | 247 | |
@@ -384,6 +388,7 @@ discard block |
||
384 | 388 | |
385 | 389 | /** |
386 | 390 | * Return the class that defines the given action, so that we know where to check allowed_actions. |
391 | + * @return string|null |
|
387 | 392 | */ |
388 | 393 | protected function definingClassForAction($actionOrigCasing) { |
389 | 394 | $action = strtolower($actionOrigCasing); |
@@ -475,6 +475,9 @@ discard block |
||
475 | 475 | $this->cache->clean("__{$class}"); |
476 | 476 | } |
477 | 477 | |
478 | + /** |
|
479 | + * @param integer $sourceOptions |
|
480 | + */ |
|
478 | 481 | protected function getUncached($class, $name, $sourceOptions, &$result, $suppress, &$tags) { |
479 | 482 | $tags[] = "__{$class}"; |
480 | 483 | $tags[] = "__{$class}__{$name}"; |
@@ -732,6 +735,10 @@ discard block |
||
732 | 735 | $this->cache = $cloned; |
733 | 736 | } |
734 | 737 | |
738 | + /** |
|
739 | + * @param integer $key |
|
740 | + * @param integer $val |
|
741 | + */ |
|
735 | 742 | public function set($key, $val, $tags = array()) { |
736 | 743 | // Find an index to set at |
737 | 744 | $replacing = null; |
@@ -767,6 +774,9 @@ discard block |
||
767 | 774 | return $this->miss ? ($this->hit / $this->miss) : 0; |
768 | 775 | } |
769 | 776 | |
777 | + /** |
|
778 | + * @param integer $key |
|
779 | + */ |
|
770 | 780 | public function get($key) { |
771 | 781 | if (isset($this->indexing[$key])) { |
772 | 782 | $this->hit++; |
@@ -780,6 +790,9 @@ discard block |
||
780 | 790 | return false; |
781 | 791 | } |
782 | 792 | |
793 | + /** |
|
794 | + * @param string $tag |
|
795 | + */ |
|
783 | 796 | public function clean($tag = null) { |
784 | 797 | if ($tag) { |
785 | 798 | foreach ($this->cache as $i => $v) { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * @see http://www.w3.org/TR/REC-html40/types.html#type-cdata |
52 | 52 | * @uses Convert::raw2att() |
53 | 53 | * @param array|string $val String to escape, or array of strings |
54 | - * @return array|string |
|
54 | + * @return string |
|
55 | 55 | */ |
56 | 56 | public static function raw2htmlname($val) { |
57 | 57 | if(is_array($val)) { |
@@ -200,6 +200,7 @@ discard block |
||
200 | 200 | * call this function directly, Please use {@link Convert::xml2array()} |
201 | 201 | * |
202 | 202 | * @param SimpleXMLElement |
203 | + * @param SimpleXMLElement $xml |
|
203 | 204 | * |
204 | 205 | * @return mixed |
205 | 206 | */ |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | /** |
57 | 57 | * Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....). |
58 | - * @return Config_ForClass|null |
|
58 | + * @return Config_ForClass |
|
59 | 59 | */ |
60 | 60 | static public function config() { |
61 | 61 | return Config::inst()->forClass(get_called_class()); |
@@ -125,8 +125,6 @@ discard block |
||
125 | 125 | * $list = DataList::create('SiteTree'); |
126 | 126 | * $list = SiteTree::get(); |
127 | 127 | * |
128 | - * @param string $class the class name |
|
129 | - * @param mixed $arguments,... arguments to pass to the constructor |
|
130 | 128 | * @return static |
131 | 129 | */ |
132 | 130 | public static function create() { |
@@ -277,8 +275,6 @@ discard block |
||
277 | 275 | * Similar to {@link Object::create()}, except that classes are only overloaded if you set the $strong parameter to |
278 | 276 | * TRUE when using {@link Object::useCustomClass()} |
279 | 277 | * |
280 | - * @param string $class the class name |
|
281 | - * @param mixed $arguments,... arguments to pass to the constructor |
|
282 | 278 | * @return static |
283 | 279 | */ |
284 | 280 | public static function strong_create() { |
@@ -330,8 +326,8 @@ discard block |
||
330 | 326 | * without any inheritance, merging or parent lookup if it doesn't exist on the given class. |
331 | 327 | * |
332 | 328 | * @static |
333 | - * @param $class - The class to get the static from |
|
334 | - * @param $name - The property to get from the class |
|
329 | + * @param string $class - The class to get the static from |
|
330 | + * @param string $name - The property to get from the class |
|
335 | 331 | * @param null $default - The value to return if property doesn't exist on class |
336 | 332 | * @return any - The value of the static property $name on class $class, or $default if that property is not |
337 | 333 | * defined |
@@ -516,7 +512,6 @@ discard block |
||
516 | 512 | * instances, not existing ones (including all instances created through {@link singleton()}). |
517 | 513 | * |
518 | 514 | * @see http://doc.silverstripe.org/framework/en/trunk/reference/dataextension |
519 | - * @param string $class Class that should be extended - has to be a subclass of {@link Object} |
|
520 | 515 | * @param string $extension Subclass of {@link Extension} with optional parameters |
521 | 516 | * as a string, e.g. "Versioned" or "Translatable('Param')" |
522 | 517 | */ |
@@ -895,6 +890,7 @@ discard block |
||
895 | 890 | |
896 | 891 | /** |
897 | 892 | * @see Object::get_static() |
893 | + * @param string $name |
|
898 | 894 | */ |
899 | 895 | public function stat($name, $uncached = false) { |
900 | 896 | return Config::inst()->get(($this->class ? $this->class : get_class($this)), $name, Config::FIRST_SET); |
@@ -902,6 +898,8 @@ discard block |
||
902 | 898 | |
903 | 899 | /** |
904 | 900 | * @see Object::set_static() |
901 | + * @param string $name |
|
902 | + * @param string $value |
|
905 | 903 | */ |
906 | 904 | public function set_stat($name, $value) { |
907 | 905 | Config::inst()->update(($this->class ? $this->class : get_class($this)), $name, $value); |
@@ -909,6 +907,7 @@ discard block |
||
909 | 907 | |
910 | 908 | /** |
911 | 909 | * @see Object::uninherited_static() |
910 | + * @param string $name |
|
912 | 911 | */ |
913 | 912 | public function uninherited($name) { |
914 | 913 | return Config::inst()->get(($this->class ? $this->class : get_class($this)), $name, Config::UNINHERITED); |
@@ -959,7 +958,7 @@ discard block |
||
959 | 958 | * all results into an array |
960 | 959 | * |
961 | 960 | * @param string $method the method name to call |
962 | - * @param mixed $argument a single argument to pass |
|
961 | + * @param string $argument a single argument to pass |
|
963 | 962 | * @return mixed |
964 | 963 | * @todo integrate inheritance rules |
965 | 964 | */ |
@@ -982,7 +981,6 @@ discard block |
||
982 | 981 | * The extension methods are defined during {@link __construct()} in {@link defineMethods()}. |
983 | 982 | * |
984 | 983 | * @param string $method the name of the method to call on each extension |
985 | - * @param mixed $a1,... up to 7 arguments to be passed to the method |
|
986 | 984 | * @return array |
987 | 985 | */ |
988 | 986 | public function extend($method, &$a1=null, &$a2=null, &$a3=null, &$a4=null, &$a5=null, &$a6=null, &$a7=null) { |