@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | /** |
| 286 | 286 | * Determine if the target folder for new uploads in is visible the field UI. |
| 287 | 287 | * |
| 288 | - * @return boolean |
|
| 288 | + * @return boolean|string |
|
| 289 | 289 | */ |
| 290 | 290 | public function canPreviewFolder() { |
| 291 | 291 | if(!$this->isActive()) return false; |
@@ -638,7 +638,7 @@ discard block |
||
| 638 | 638 | /** |
| 639 | 639 | * Determine if the user has permission to upload. |
| 640 | 640 | * |
| 641 | - * @return boolean |
|
| 641 | + * @return boolean|string |
|
| 642 | 642 | */ |
| 643 | 643 | public function canUpload() { |
| 644 | 644 | if(!$this->isActive()) return false; |
@@ -662,7 +662,7 @@ discard block |
||
| 662 | 662 | * Determine if the user has permission to attach existing files |
| 663 | 663 | * By default returns true if the user has the CMS_ACCESS_AssetAdmin permission |
| 664 | 664 | * |
| 665 | - * @return boolean |
|
| 665 | + * @return boolean|string |
|
| 666 | 666 | */ |
| 667 | 667 | public function canAttachExisting() { |
| 668 | 668 | if(!$this->isActive()) return false; |
@@ -1094,7 +1094,7 @@ discard block |
||
| 1094 | 1094 | |
| 1095 | 1095 | /** |
| 1096 | 1096 | * @param SS_HTTPRequest $request |
| 1097 | - * @return UploadField_ItemHandler |
|
| 1097 | + * @return UploadField_SelectHandler |
|
| 1098 | 1098 | */ |
| 1099 | 1099 | public function handleSelect(SS_HTTPRequest $request) { |
| 1100 | 1100 | if(!$this->canAttachExisting()) return $this->httpError(403); |
@@ -1457,7 +1457,7 @@ discard block |
||
| 1457 | 1457 | * Action to handle editing of a single file |
| 1458 | 1458 | * |
| 1459 | 1459 | * @param SS_HTTPRequest $request |
| 1460 | - * @return ViewableData_Customised |
|
| 1460 | + * @return DBHTMLText |
|
| 1461 | 1461 | */ |
| 1462 | 1462 | public function edit(SS_HTTPRequest $request) { |
| 1463 | 1463 | // Check form field state |
@@ -475,7 +475,7 @@ |
||
| 475 | 475 | /** |
| 476 | 476 | * Given an index spec determines the index type |
| 477 | 477 | * |
| 478 | - * @param array|string $spec |
|
| 478 | + * @param string $spec |
|
| 479 | 479 | * @return string |
| 480 | 480 | */ |
| 481 | 481 | protected function determineIndexType($spec) { |
@@ -507,7 +507,7 @@ discard block |
||
| 507 | 507 | * Combine the given forms into a formset with a tabbed interface |
| 508 | 508 | * |
| 509 | 509 | * @param array $forms List of LoginForm instances |
| 510 | - * @return string |
|
| 510 | + * @return \SilverStripe\ORM\FieldType\DBHTMLText |
|
| 511 | 511 | */ |
| 512 | 512 | protected function generateLoginFormSet($forms) { |
| 513 | 513 | $viewData = new ArrayData(array( |
@@ -795,7 +795,7 @@ discard block |
||
| 795 | 795 | * For use in any subclass. |
| 796 | 796 | * |
| 797 | 797 | * @param string $name |
| 798 | - * @return array Returns the template(s) for rendering |
|
| 798 | + * @return string[] Returns the template(s) for rendering |
|
| 799 | 799 | */ |
| 800 | 800 | public function getIncludeTemplate($name) { |
| 801 | 801 | return array('Security_' . $name); |
@@ -883,7 +883,7 @@ discard block |
||
| 883 | 883 | * |
| 884 | 884 | * @param string $username The user name |
| 885 | 885 | * @param string $password The password (in cleartext) |
| 886 | - * @return bool |
|
| 886 | + * @return false|null |
|
| 887 | 887 | */ |
| 888 | 888 | public static function setDefaultAdmin($username, $password) { |
| 889 | 889 | // don't overwrite if already set |
@@ -970,7 +970,7 @@ discard block |
||
| 970 | 970 | * @deprecated 4.0 Use the "Security.password_encryption_algorithm" config setting instead |
| 971 | 971 | * @param string $algorithm One of the available password encryption |
| 972 | 972 | * algorithms determined by {@link Security::get_encryption_algorithms()} |
| 973 | - * @return bool Returns TRUE if the passed algorithm was valid, otherwise FALSE. |
|
| 973 | + * @return boolean|null Returns TRUE if the passed algorithm was valid, otherwise FALSE. |
|
| 974 | 974 | */ |
| 975 | 975 | public static function set_password_encryption_algorithm($algorithm) { |
| 976 | 976 | Deprecation::notice('4.0', 'Use the "Security.password_encryption_algorithm" config setting instead'); |
@@ -1138,7 +1138,7 @@ discard block |
||
| 1138 | 1138 | /** |
| 1139 | 1139 | * Set to true to ignore access to disallowed actions, rather than returning permission failure |
| 1140 | 1140 | * Note that this is just a flag that other code needs to check with Security::ignore_disallowed_actions() |
| 1141 | - * @param $flag True or false |
|
| 1141 | + * @param boolean $flag True or false |
|
| 1142 | 1142 | */ |
| 1143 | 1143 | public static function set_ignore_disallowed_actions($flag) { |
| 1144 | 1144 | self::$ignore_disallowed_actions = $flag; |
@@ -59,6 +59,9 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | // -- Public Static Methods -------------------------------------------------- |
| 61 | 61 | |
| 62 | + /** |
|
| 63 | + * @param string $js |
|
| 64 | + */ |
|
| 62 | 65 | public static function minify($js) {
|
| 63 | 66 | $jsmin = new JSMin($js); |
| 64 | 67 | return $jsmin->min(); |
@@ -82,6 +85,10 @@ discard block |
||
| 82 | 85 | action treats a string as a single character. Wow! |
| 83 | 86 | action recognizes a regular expression if it is preceded by ( or , or =. |
| 84 | 87 | */ |
| 88 | + |
|
| 89 | + /** |
|
| 90 | + * @param integer $d |
|
| 91 | + */ |
|
| 85 | 92 | protected function action($d) {
|
| 86 | 93 | switch($d) {
|
| 87 | 94 | case 1: |
@@ -160,6 +167,9 @@ discard block |
||
| 160 | 167 | } |
| 161 | 168 | } |
| 162 | 169 | |
| 170 | + /** |
|
| 171 | + * @return string |
|
| 172 | + */ |
|
| 163 | 173 | protected function get() {
|
| 164 | 174 | $c = $this->lookAhead; |
| 165 | 175 | $this->lookAhead = null; |
@@ -187,6 +197,10 @@ discard block |
||
| 187 | 197 | /* isAlphanum -- return true if the character is a letter, digit, underscore, |
| 188 | 198 | dollar sign, or non-ASCII character. |
| 189 | 199 | */ |
| 200 | + |
|
| 201 | + /** |
|
| 202 | + * @param string $c |
|
| 203 | + */ |
|
| 190 | 204 | protected function isAlphaNum($c) {
|
| 191 | 205 | return ord($c) > 126 || $c === '\\' || preg_match('/^[\w\$]$/', $c) === 1;
|
| 192 | 206 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | * |
| 25 | 25 | * @param array $properties |
| 26 | 26 | * |
| 27 | - * @return string |
|
| 27 | + * @return SilverStripe\ORM\FieldType\DBHTMLText |
|
| 28 | 28 | */ |
| 29 | 29 | public function Field($properties = array()) { |
| 30 | 30 | $source = ArrayLib::flatten($this->getSource()); |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | * If $dontEscape is false the returned value will be safely encoded, |
| 96 | 96 | * but should not be escaped by the frontend. |
| 97 | 97 | * |
| 98 | - * @return mixed|string |
|
| 98 | + * @return string |
|
| 99 | 99 | */ |
| 100 | 100 | public function Value() { |
| 101 | 101 | // Get raw value |
@@ -760,7 +760,6 @@ discard block |
||
| 760 | 760 | * Set the field value. |
| 761 | 761 | * |
| 762 | 762 | * @param mixed $value |
| 763 | - * @param null|array|DataObject $data {@see Form::loadDataFrom} |
|
| 764 | 763 | * |
| 765 | 764 | * @return $this |
| 766 | 765 | */ |
@@ -1184,7 +1183,7 @@ discard block |
||
| 1184 | 1183 | /** |
| 1185 | 1184 | * @param FormTransformation $transformation |
| 1186 | 1185 | * |
| 1187 | - * @return mixed |
|
| 1186 | + * @return FormField |
|
| 1188 | 1187 | */ |
| 1189 | 1188 | public function transform(FormTransformation $transformation) { |
| 1190 | 1189 | return $transformation->transform($this); |
@@ -1287,7 +1286,7 @@ discard block |
||
| 1287 | 1286 | * This function is used by the template processor. If you refer to a field as a $ variable, it |
| 1288 | 1287 | * will return the $Field value. |
| 1289 | 1288 | * |
| 1290 | - * @return string |
|
| 1289 | + * @return DBHTMLText |
|
| 1291 | 1290 | */ |
| 1292 | 1291 | public function forTemplate() { |
| 1293 | 1292 | return $this->Field(); |
@@ -1309,7 +1308,7 @@ discard block |
||
| 1309 | 1308 | * |
| 1310 | 1309 | * @param FieldList $containerFieldList |
| 1311 | 1310 | * |
| 1312 | - * @return FieldList |
|
| 1311 | + * @return FormField |
|
| 1313 | 1312 | */ |
| 1314 | 1313 | public function setContainerFieldList($containerFieldList) { |
| 1315 | 1314 | $this->containerFieldList = $containerFieldList; |
@@ -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}"; |
@@ -603,7 +609,7 @@ discard block |
||
| 603 | 609 | * replace the current array value, you'll need to call remove first. |
| 604 | 610 | * |
| 605 | 611 | * @param $class string - The class to update a configuration value for |
| 606 | - * @param $name string - The configuration property name to update |
|
| 612 | + * @param string $name string - The configuration property name to update |
|
| 607 | 613 | * @param $value any - The value to update with |
| 608 | 614 | * |
| 609 | 615 | * Arrays are recursively merged into current configuration as "latest" - for associative arrays the passed value |
@@ -648,15 +654,6 @@ discard block |
||
| 648 | 654 | * |
| 649 | 655 | * @param string $class The class to remove a configuration value from |
| 650 | 656 | * @param string $name The configuration name |
| 651 | - * @param mixed $key An optional key to filter against. |
|
| 652 | - * If referenced config value is an array, only members of that array that match this key will be removed |
|
| 653 | - * Must also match value if provided to be removed |
|
| 654 | - * @param mixed $value And optional value to filter against. |
|
| 655 | - * If referenced config value is an array, only members of that array that match this value will be removed |
|
| 656 | - * If referenced config value is not an array, value will be removed only if it matches this argument |
|
| 657 | - * Must also match key if provided and referenced config value is an array to be removed |
|
| 658 | - * |
|
| 659 | - * Matching is always by "==", not by "===" |
|
| 660 | 657 | */ |
| 661 | 658 | public function remove($class, $name /*,$key = null*/ /*,$value = null*/) { |
| 662 | 659 | $argc = func_num_args(); |
@@ -735,6 +732,10 @@ discard block |
||
| 735 | 732 | $this->cache = $cloned; |
| 736 | 733 | } |
| 737 | 734 | |
| 735 | + /** |
|
| 736 | + * @param integer $key |
|
| 737 | + * @param integer $val |
|
| 738 | + */ |
|
| 738 | 739 | public function set($key, $val, $tags = array()) { |
| 739 | 740 | // Find an index to set at |
| 740 | 741 | $replacing = null; |
@@ -775,7 +776,7 @@ discard block |
||
| 775 | 776 | * For a more robust cache checking, use {@link checkAndGet()} |
| 776 | 777 | * |
| 777 | 778 | * @param string $key The cache key |
| 778 | - * @return variant Cached value, if hit. False otherwise |
|
| 779 | + * @return boolean Cached value, if hit. False otherwise |
|
| 779 | 780 | */ |
| 780 | 781 | public function get($key) { |
| 781 | 782 | list($hit, $result) = $this->checkAndGet($key); |
@@ -803,6 +804,9 @@ discard block |
||
| 803 | 804 | } |
| 804 | 805 | } |
| 805 | 806 | |
| 807 | + /** |
|
| 808 | + * @param string $tag |
|
| 809 | + */ |
|
| 806 | 810 | public function clean($tag = null) { |
| 807 | 811 | if ($tag) { |
| 808 | 812 | foreach ($this->cache as $i => $v) { |
@@ -841,6 +845,10 @@ discard block |
||
| 841 | 845 | $this->cache = array(); |
| 842 | 846 | } |
| 843 | 847 | |
| 848 | + /** |
|
| 849 | + * @param integer $key |
|
| 850 | + * @param integer $val |
|
| 851 | + */ |
|
| 844 | 852 | public function set($key, $val, $tags = array()) { |
| 845 | 853 | foreach($tags as $t) { |
| 846 | 854 | if(!isset($this->tags[$t])) { |
@@ -859,6 +867,11 @@ discard block |
||
| 859 | 867 | return $this->miss ? ($this->hit / $this->miss) : 0; |
| 860 | 868 | } |
| 861 | 869 | |
| 870 | + /** |
|
| 871 | + * @param integer $key |
|
| 872 | + * |
|
| 873 | + * @return boolean |
|
| 874 | + */ |
|
| 862 | 875 | public function get($key) { |
| 863 | 876 | list($hit, $result) = $this->checkAndGet($key); |
| 864 | 877 | return $hit ? $result : false; |
@@ -878,6 +891,9 @@ discard block |
||
| 878 | 891 | } |
| 879 | 892 | } |
| 880 | 893 | |
| 894 | + /** |
|
| 895 | + * @param string $tag |
|
| 896 | + */ |
|
| 881 | 897 | public function clean($tag = null) { |
| 882 | 898 | if($tag) { |
| 883 | 899 | if(isset($this->tags[$tag])) { |
@@ -7,9 +7,27 @@ |
||
| 7 | 7 | * @subpackage manifest |
| 8 | 8 | */ |
| 9 | 9 | interface ManifestCache { |
| 10 | + |
|
| 11 | + /** |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 10 | 14 | public function __construct($name); |
| 15 | + |
|
| 16 | + /** |
|
| 17 | + * @param string $key |
|
| 18 | + */ |
|
| 11 | 19 | public function load($key); |
| 20 | + |
|
| 21 | + /** |
|
| 22 | + * @param string $key |
|
| 23 | + * |
|
| 24 | + * @return void |
|
| 25 | + */ |
|
| 12 | 26 | public function save($data, $key); |
| 27 | + |
|
| 28 | + /** |
|
| 29 | + * @return void |
|
| 30 | + */ |
|
| 13 | 31 | public function clear(); |
| 14 | 32 | } |
| 15 | 33 | |