@@ -335,8 +335,8 @@ |
||
| 335 | 335 | /** |
| 336 | 336 | * Extracts the response body and headers from a full curl response |
| 337 | 337 | * |
| 338 | - * @param curl_handle $ch The curl handle for the request |
|
| 339 | - * @param string $rawResponse The raw response text |
|
| 338 | + * @param resource $ch The curl handle for the request |
|
| 339 | + * @param string $rawHeaders |
|
| 340 | 340 | * |
| 341 | 341 | * @return RestfulService_Response The response object |
| 342 | 342 | */ |
@@ -42,6 +42,9 @@ discard block |
||
| 42 | 42 | $this->cache->setOption($name, $value); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | + /** |
|
| 46 | + * @param string $name |
|
| 47 | + */ |
|
| 45 | 48 | public function getOption($name) { |
| 46 | 49 | return $this->cache->getOption($name); |
| 47 | 50 | } |
@@ -82,6 +85,9 @@ discard block |
||
| 82 | 85 | return $this->cache->touch($this->getKeyID($id), $extraLifetime); |
| 83 | 86 | } |
| 84 | 87 | |
| 88 | + /** |
|
| 89 | + * @return string |
|
| 90 | + */ |
|
| 85 | 91 | public function load($id, $doNotTestCacheValidity = false, $doNotUnserialize = false) { |
| 86 | 92 | return $this->cache->load($this->getKeyID($id), $doNotTestCacheValidity, $doNotUnserialize); |
| 87 | 93 | } |
@@ -90,6 +96,9 @@ discard block |
||
| 90 | 96 | return $this->cache->test($this->getKeyID($id)); |
| 91 | 97 | } |
| 92 | 98 | |
| 99 | + /** |
|
| 100 | + * @param string $data |
|
| 101 | + */ |
|
| 93 | 102 | public function save($data, $id = null, $tags = array(), $specificLifetime = false, $priority = 8) { |
| 94 | 103 | return $this->cache->save( |
| 95 | 104 | $data, |
@@ -100,6 +109,9 @@ discard block |
||
| 100 | 109 | ); |
| 101 | 110 | } |
| 102 | 111 | |
| 112 | + /** |
|
| 113 | + * @param string $id |
|
| 114 | + */ |
|
| 103 | 115 | public function remove($id) { |
| 104 | 116 | return $this->cache->remove($this->getKeyID($id)); |
| 105 | 117 | } |
@@ -144,13 +144,13 @@ |
||
| 144 | 144 | * @see http://uk3.php.net/manual/en/function.setcookie.php |
| 145 | 145 | * |
| 146 | 146 | * @param string $name The name of the cookie |
| 147 | - * @param string|array|false $value The value for the cookie to hold |
|
| 147 | + * @param false|string $value The value for the cookie to hold |
|
| 148 | 148 | * @param int $expiry The number of days until expiry |
| 149 | 149 | * @param string $path The path to save the cookie on (falls back to site base) |
| 150 | 150 | * @param string $domain The domain to make the cookie available on |
| 151 | 151 | * @param boolean $secure Can the cookie only be sent over SSL? |
| 152 | 152 | * @param boolean $httpOnly Prevent the cookie being accessible by JS |
| 153 | - * @return boolean If the cookie was set or not; doesn't mean it's accepted by the browser |
|
| 153 | + * @return boolean|null If the cookie was set or not; doesn't mean it's accepted by the browser |
|
| 154 | 154 | */ |
| 155 | 155 | protected function outputCookie( |
| 156 | 156 | $name, $value, $expiry = 90, $path = null, $domain = null, $secure = false, $httpOnly = true |
@@ -282,6 +282,9 @@ discard block |
||
| 282 | 282 | return count($result) ? $result : null; |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | + /** |
|
| 286 | + * @param string $content |
|
| 287 | + */ |
|
| 285 | 288 | public static function getLinksIn($content) { |
| 286 | 289 | return self::findByTagAndAttribute($content, array("a" => "href")); |
| 287 | 290 | } |
@@ -338,11 +341,17 @@ discard block |
||
| 338 | 341 | self::$modification_date = $timestamp; |
| 339 | 342 | } |
| 340 | 343 | |
| 344 | + /** |
|
| 345 | + * @param integer $timestamp |
|
| 346 | + */ |
|
| 341 | 347 | public static function register_modification_timestamp($timestamp) { |
| 342 | 348 | if($timestamp > self::$modification_date) |
| 343 | 349 | self::$modification_date = $timestamp; |
| 344 | 350 | } |
| 345 | 351 | |
| 352 | + /** |
|
| 353 | + * @param string $etag |
|
| 354 | + */ |
|
| 346 | 355 | public static function register_etag($etag) { |
| 347 | 356 | if (0 !== strpos($etag, '"')) { |
| 348 | 357 | $etag = sprintf('"%s"', $etag); |
@@ -507,7 +516,7 @@ discard block |
||
| 507 | 516 | } |
| 508 | 517 | |
| 509 | 518 | /** |
| 510 | - * @param SS_HTTPResponse|string $response |
|
| 519 | + * @param SS_HTTPResponse|null $response |
|
| 511 | 520 | * |
| 512 | 521 | * @return string|false |
| 513 | 522 | */ |
@@ -549,7 +558,6 @@ discard block |
||
| 549 | 558 | /** |
| 550 | 559 | * Combine vary strings |
| 551 | 560 | * |
| 552 | - * @param string $vary,... Each vary as a separate arg |
|
| 553 | 561 | * @return string |
| 554 | 562 | */ |
| 555 | 563 | protected static function combineVary($vary) |
@@ -129,6 +129,7 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | /** |
| 131 | 131 | * Set the DataModel for this request. |
| 132 | + * @param DataModel $model |
|
| 132 | 133 | */ |
| 133 | 134 | public function setDataModel($model) { |
| 134 | 135 | $this->model = $model; |
@@ -246,6 +247,9 @@ discard block |
||
| 246 | 247 | return $this; |
| 247 | 248 | } |
| 248 | 249 | |
| 250 | + /** |
|
| 251 | + * @param SS_HTTPRequest $request |
|
| 252 | + */ |
|
| 249 | 253 | protected function findAction($request) { |
| 250 | 254 | $handlerClass = ($this->class) ? $this->class : get_class($this); |
| 251 | 255 | |
@@ -392,6 +396,7 @@ discard block |
||
| 392 | 396 | |
| 393 | 397 | /** |
| 394 | 398 | * Return the class that defines the given action, so that we know where to check allowed_actions. |
| 399 | + * @return string|null |
|
| 395 | 400 | */ |
| 396 | 401 | protected function definingClassForAction($actionOrigCasing) { |
| 397 | 402 | $action = strtolower($actionOrigCasing); |
@@ -500,6 +505,7 @@ discard block |
||
| 500 | 505 | * or {@link handleRequest()}, but in some based we want to set it manually. |
| 501 | 506 | * |
| 502 | 507 | * @param SS_HTTPRequest |
| 508 | + * @param SS_HTTPRequest $request |
|
| 503 | 509 | */ |
| 504 | 510 | public function setRequest($request) { |
| 505 | 511 | $this->request = $request; |
@@ -508,7 +514,6 @@ discard block |
||
| 508 | 514 | /** |
| 509 | 515 | * Returns a link to this controller. Overload with your own Link rules if they exist. |
| 510 | 516 | * |
| 511 | - * @param string $action Optional action (soft-supported via func_get_args) |
|
| 512 | 517 | * @return string |
| 513 | 518 | */ |
| 514 | 519 | public function Link() { |
@@ -265,7 +265,6 @@ discard block |
||
| 265 | 265 | * |
| 266 | 266 | * @deprecated 4.0 Use the "Session.timeout_ips" config setting instead |
| 267 | 267 | * |
| 268 | - * @param array $session_ips Array of IPv4 rules. |
|
| 269 | 268 | */ |
| 270 | 269 | public static function set_timeout_ips($ips) { |
| 271 | 270 | Deprecation::notice('4.0', 'Use the "Session.timeout_ips" config setting instead'); |
@@ -462,6 +461,9 @@ discard block |
||
| 462 | 461 | $diffVar[sizeof($var)-1] = $val; |
| 463 | 462 | } |
| 464 | 463 | |
| 464 | + /** |
|
| 465 | + * @param string $name |
|
| 466 | + */ |
|
| 465 | 467 | public function inst_get($name) { |
| 466 | 468 | // Quicker execution path for "."-free names |
| 467 | 469 | if(strpos($name,'.') === false) { |
@@ -470,11 +470,17 @@ discard block |
||
| 470 | 470 | |
| 471 | 471 | protected $extraConfigSources = array(); |
| 472 | 472 | |
| 473 | + /** |
|
| 474 | + * @param string $class |
|
| 475 | + */ |
|
| 473 | 476 | public function extraConfigSourcesChanged($class) { |
| 474 | 477 | unset($this->extraConfigSources[$class]); |
| 475 | 478 | $this->cache->clean("__{$class}"); |
| 476 | 479 | } |
| 477 | 480 | |
| 481 | + /** |
|
| 482 | + * @param integer $sourceOptions |
|
| 483 | + */ |
|
| 478 | 484 | protected function getUncached($class, $name, $sourceOptions, &$result, $suppress, &$tags) { |
| 479 | 485 | $tags[] = "__{$class}"; |
| 480 | 486 | $tags[] = "__{$class}__{$name}"; |
@@ -604,7 +610,7 @@ discard block |
||
| 604 | 610 | * |
| 605 | 611 | * @param string $class The class to update a configuration value for |
| 606 | 612 | * @param string $name The configuration property name to update |
| 607 | - * @param mixed $value The value to update with |
|
| 613 | + * @param mixed $val The value to update with |
|
| 608 | 614 | * |
| 609 | 615 | * Arrays are recursively merged into current configuration as "latest" - for associative arrays the passed value |
| 610 | 616 | * replaces any item with the same key, for sequential arrays the items are placed at the end of the array, for |
@@ -728,6 +734,10 @@ discard block |
||
| 728 | 734 | $this->cache = $cloned; |
| 729 | 735 | } |
| 730 | 736 | |
| 737 | + /** |
|
| 738 | + * @param integer $key |
|
| 739 | + * @param integer $val |
|
| 740 | + */ |
|
| 731 | 741 | public function set($key, $val, $tags = array()) { |
| 732 | 742 | // Find an index to set at |
| 733 | 743 | $replacing = null; |
@@ -796,6 +806,9 @@ discard block |
||
| 796 | 806 | } |
| 797 | 807 | } |
| 798 | 808 | |
| 809 | + /** |
|
| 810 | + * @param string $tag |
|
| 811 | + */ |
|
| 799 | 812 | public function clean($tag = null) { |
| 800 | 813 | if ($tag) { |
| 801 | 814 | foreach ($this->cache as $i => $v) { |
@@ -827,6 +840,10 @@ discard block |
||
| 827 | 840 | $this->cache = array(); |
| 828 | 841 | } |
| 829 | 842 | |
| 843 | + /** |
|
| 844 | + * @param integer $key |
|
| 845 | + * @param integer $val |
|
| 846 | + */ |
|
| 830 | 847 | public function set($key, $val, $tags = array()) { |
| 831 | 848 | foreach($tags as $t) { |
| 832 | 849 | if(!isset($this->tags[$t])) { |
@@ -845,6 +862,9 @@ discard block |
||
| 845 | 862 | return $this->miss ? ($this->hit / $this->miss) : 0; |
| 846 | 863 | } |
| 847 | 864 | |
| 865 | + /** |
|
| 866 | + * @param integer $key |
|
| 867 | + */ |
|
| 848 | 868 | public function get($key) { |
| 849 | 869 | list($hit, $result) = $this->checkAndGet($key); |
| 850 | 870 | return $hit ? $result : false; |
@@ -864,6 +884,9 @@ discard block |
||
| 864 | 884 | } |
| 865 | 885 | } |
| 866 | 886 | |
| 887 | + /** |
|
| 888 | + * @param string $tag |
|
| 889 | + */ |
|
| 867 | 890 | public function clean($tag = null) { |
| 868 | 891 | if($tag) { |
| 869 | 892 | if(isset($this->tags[$tag])) { |
@@ -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() { |
@@ -149,7 +147,6 @@ discard block |
||
| 149 | 147 | * way to access instance methods which don't rely on instance |
| 150 | 148 | * data (e.g. the custom SilverStripe static handling). |
| 151 | 149 | * |
| 152 | - * @param string $className Optional classname (if called on Object directly) |
|
| 153 | 150 | * @return static The singleton instance |
| 154 | 151 | */ |
| 155 | 152 | public static function singleton() { |
@@ -334,8 +331,6 @@ discard block |
||
| 334 | 331 | * Similar to {@link Object::create()}, except that classes are only overloaded if you set the $strong parameter to |
| 335 | 332 | * TRUE when using {@link Object::useCustomClass()} |
| 336 | 333 | * |
| 337 | - * @param string $class the class name |
|
| 338 | - * @param mixed $arguments,... arguments to pass to the constructor |
|
| 339 | 334 | * @return static |
| 340 | 335 | */ |
| 341 | 336 | public static function strong_create() { |
@@ -387,8 +382,8 @@ discard block |
||
| 387 | 382 | * without any inheritance, merging or parent lookup if it doesn't exist on the given class. |
| 388 | 383 | * |
| 389 | 384 | * @static |
| 390 | - * @param $class - The class to get the static from |
|
| 391 | - * @param $name - The property to get from the class |
|
| 385 | + * @param string $class - The class to get the static from |
|
| 386 | + * @param string $name - The property to get from the class |
|
| 392 | 387 | * @param null $default - The value to return if property doesn't exist on class |
| 393 | 388 | * @return any - The value of the static property $name on class $class, or $default if that property is not |
| 394 | 389 | * defined |
@@ -955,6 +950,7 @@ discard block |
||
| 955 | 950 | |
| 956 | 951 | /** |
| 957 | 952 | * @see SS_Object::get_static() |
| 953 | + * @param string $name |
|
| 958 | 954 | */ |
| 959 | 955 | public function stat($name, $uncached = false) { |
| 960 | 956 | return Config::inst()->get(($this->class ? $this->class : get_class($this)), $name, Config::FIRST_SET); |
@@ -962,6 +958,8 @@ discard block |
||
| 962 | 958 | |
| 963 | 959 | /** |
| 964 | 960 | * @see SS_Object::set_static() |
| 961 | + * @param string $name |
|
| 962 | + * @param string $value |
|
| 965 | 963 | */ |
| 966 | 964 | public function set_stat($name, $value) { |
| 967 | 965 | Config::inst()->update(($this->class ? $this->class : get_class($this)), $name, $value); |
@@ -969,6 +967,7 @@ discard block |
||
| 969 | 967 | |
| 970 | 968 | /** |
| 971 | 969 | * @see SS_Object::uninherited_static() |
| 970 | + * @param string $name |
|
| 972 | 971 | */ |
| 973 | 972 | public function uninherited($name) { |
| 974 | 973 | return Config::inst()->get(($this->class ? $this->class : get_class($this)), $name, Config::UNINHERITED); |
@@ -1019,7 +1018,7 @@ discard block |
||
| 1019 | 1018 | * all results into an array |
| 1020 | 1019 | * |
| 1021 | 1020 | * @param string $method the method name to call |
| 1022 | - * @param mixed $argument a single argument to pass |
|
| 1021 | + * @param string $argument a single argument to pass |
|
| 1023 | 1022 | * @return mixed |
| 1024 | 1023 | * @todo integrate inheritance rules |
| 1025 | 1024 | */ |
@@ -1045,7 +1044,7 @@ discard block |
||
| 1045 | 1044 | * @param mixed $a1 |
| 1046 | 1045 | * @param mixed $a2 |
| 1047 | 1046 | * @param mixed $a3 |
| 1048 | - * @param mixed $a4 |
|
| 1047 | + * @param DataObject $a4 |
|
| 1049 | 1048 | * @param mixed $a5 |
| 1050 | 1049 | * @param mixed $a6 |
| 1051 | 1050 | * @param mixed $a7 |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | * |
| 116 | 116 | * @param unknown_type $returnVal |
| 117 | 117 | * @param unknown_type $ignoreAjax |
| 118 | - * @return unknown |
|
| 118 | + * @return string|null |
|
| 119 | 119 | */ |
| 120 | 120 | public static function backtrace($returnVal = false, $ignoreAjax = false, $ignoredFunctions = null) { |
| 121 | 121 | $plainText = Director::is_cli() || (Director::is_ajax() && !$ignoreAjax); |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | * shown |
| 133 | 133 | * |
| 134 | 134 | * @param SS_Object $item |
| 135 | - * @param boolean $showArg |
|
| 135 | + * @param boolean $showArgs |
|
| 136 | 136 | * @param Int $argCharLimit |
| 137 | 137 | * @return String |
| 138 | 138 | */ |