@@ -66,6 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | /** |
68 | 68 | * @param TXmlElement parent element of this element |
69 | + * @param TXmlElement|null $parent |
|
69 | 70 | */ |
70 | 71 | public function setParent($parent) |
71 | 72 | { |
@@ -175,6 +176,7 @@ discard block |
||
175 | 176 | } |
176 | 177 | |
177 | 178 | /** |
179 | + * @param string $tagName |
|
178 | 180 | * @return TList list of all child elements that have the specified tag-name |
179 | 181 | */ |
180 | 182 | public function getElementsByTagName($tagName) |
@@ -334,6 +336,7 @@ discard block |
||
334 | 336 | |
335 | 337 | /** |
336 | 338 | * @param string version of this XML document |
339 | + * @param string $version |
|
337 | 340 | */ |
338 | 341 | public function setVersion($version) |
339 | 342 | { |
@@ -350,6 +353,7 @@ discard block |
||
350 | 353 | |
351 | 354 | /** |
352 | 355 | * @param string encoding of this XML document |
356 | + * @param string $encoding |
|
353 | 357 | */ |
354 | 358 | public function setEncoding($encoding) |
355 | 359 | { |
@@ -473,6 +477,7 @@ discard block |
||
473 | 477 | /** |
474 | 478 | * Recursively converts DOM XML nodes into TXmlElement |
475 | 479 | * @param DOMXmlNode the node to be converted |
480 | + * @param DOMElement $node |
|
476 | 481 | * @return TXmlElement the converted TXmlElement |
477 | 482 | */ |
478 | 483 | protected function buildElement($node) |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | * the control ID will take the precedence. |
210 | 210 | * |
211 | 211 | * @param string the property name or control ID |
212 | - * @return bool wether the control or property exists |
|
212 | + * @return boolean|null wether the control or property exists |
|
213 | 213 | * @see __get |
214 | 214 | */ |
215 | 215 | public function __isset($name) { |
@@ -286,6 +286,7 @@ discard block |
||
286 | 286 | * Sets the page for a control. |
287 | 287 | * Only framework developers should use this method. |
288 | 288 | * @param TPage the page that contains this control |
289 | + * @param TPage $page |
|
289 | 290 | */ |
290 | 291 | public function setPage($page) |
291 | 292 | { |
@@ -567,6 +568,7 @@ discard block |
||
567 | 568 | |
568 | 569 | /** |
569 | 570 | * @param boolean whether the control is visible |
571 | + * @param boolean $value |
|
570 | 572 | */ |
571 | 573 | public function setVisible($value) |
572 | 574 | { |
@@ -634,6 +636,7 @@ discard block |
||
634 | 636 | } |
635 | 637 | |
636 | 638 | /** |
639 | + * @param string $name |
|
637 | 640 | * @return boolean whether the named attribute exists |
638 | 641 | */ |
639 | 642 | public function hasAttribute($name) |
@@ -645,6 +648,7 @@ discard block |
||
645 | 648 | } |
646 | 649 | |
647 | 650 | /** |
651 | + * @param string $name |
|
648 | 652 | * @return string attribute value, null if attribute does not exist |
649 | 653 | */ |
650 | 654 | public function getAttribute($name) |
@@ -659,6 +663,7 @@ discard block |
||
659 | 663 | * Sets a custom control attribute. |
660 | 664 | * @param string attribute name |
661 | 665 | * @param string value of the attribute |
666 | + * @param string $name |
|
662 | 667 | */ |
663 | 668 | public function setAttribute($name,$value) |
664 | 669 | { |
@@ -696,6 +701,7 @@ discard block |
||
696 | 701 | |
697 | 702 | /** |
698 | 703 | * @param boolean set whether to enable viewstate |
704 | + * @param boolean $value |
|
699 | 705 | */ |
700 | 706 | public function setEnableViewState($value) |
701 | 707 | { |
@@ -712,6 +718,8 @@ discard block |
||
712 | 718 | * that must be kept in controlstate. |
713 | 719 | * @param string the name of the controlstate value to be returned |
714 | 720 | * @param mixed the default value. If $key is not found in controlstate, $defaultValue will be returned |
721 | + * @param string $key |
|
722 | + * @param integer $defaultValue |
|
715 | 723 | * @return mixed the controlstate value corresponding to $key |
716 | 724 | */ |
717 | 725 | protected function getControlState($key,$defaultValue=null) |
@@ -728,6 +736,8 @@ discard block |
||
728 | 736 | * @param string the name of the controlstate value |
729 | 737 | * @param mixed the controlstate value to be set |
730 | 738 | * @param mixed default value. If $value===$defaultValue, the item will be cleared from controlstate |
739 | + * @param string $key |
|
740 | + * @param integer $defaultValue |
|
731 | 741 | */ |
732 | 742 | protected function setControlState($key,$value,$defaultValue=null) |
733 | 743 | { |
@@ -751,6 +761,7 @@ discard block |
||
751 | 761 | * When it is false, data saved via setViewState() will not be persisted. |
752 | 762 | * By default, it is true, meaning data will be persisted across postbacks. |
753 | 763 | * @param boolean whether data should be persisted |
764 | + * @param boolean $enabled |
|
754 | 765 | */ |
755 | 766 | public function trackViewState($enabled) |
756 | 767 | { |
@@ -789,6 +800,7 @@ discard block |
||
789 | 800 | * @param string the name of the viewstate value |
790 | 801 | * @param mixed the viewstate value to be set |
791 | 802 | * @param mixed default value. If $value===$defaultValue, the item will be cleared from the viewstate. |
803 | + * @param string $key |
|
792 | 804 | */ |
793 | 805 | public function setViewState($key,$value,$defaultValue=null) |
794 | 806 | { |
@@ -813,6 +825,7 @@ discard block |
||
813 | 825 | /** |
814 | 826 | * Clears a viewstate value. |
815 | 827 | * @param string the name of the viewstate value to be cleared |
828 | + * @param string $key |
|
816 | 829 | */ |
817 | 830 | public function clearViewState($key) |
818 | 831 | { |
@@ -918,6 +931,7 @@ discard block |
||
918 | 931 | * Sets a value indicating whether child controls are created. |
919 | 932 | * If false, any existing child controls will be cleared up. |
920 | 933 | * @param boolean whether child controls are created |
934 | + * @param boolean $value |
|
921 | 935 | */ |
922 | 936 | final protected function setChildControlsCreated($value) |
923 | 937 | { |
@@ -1008,6 +1022,7 @@ discard block |
||
1008 | 1022 | * Finds all child and grand-child controls that are of the specified type. |
1009 | 1023 | * @param string the class name |
1010 | 1024 | * @param boolean whether the type comparison is strict or not. If false, controls of the parent classes of the specified class will also be returned. |
1025 | + * @param string $type |
|
1011 | 1026 | * @return array list of controls found |
1012 | 1027 | */ |
1013 | 1028 | public function findControlsByType($type,$strict=true) |
@@ -1142,6 +1157,7 @@ discard block |
||
1142 | 1157 | * A component with explicit ID on a template will be registered to |
1143 | 1158 | * the template owner. This method allows you to obtain this component |
1144 | 1159 | * with the ID. |
1160 | + * @param string $name |
|
1145 | 1161 | * @return mixed the named registered object. Null if object is not found. |
1146 | 1162 | */ |
1147 | 1163 | public function getRegisteredObject($name) |
@@ -1199,6 +1215,7 @@ discard block |
||
1199 | 1215 | * Control lifecycles will be caught up during the addition. |
1200 | 1216 | * Only framework developers should use this method. |
1201 | 1217 | * @param TControl the new child control |
1218 | + * @param TControl $control |
|
1202 | 1219 | */ |
1203 | 1220 | public function addedControl($control) |
1204 | 1221 | { |
@@ -1244,6 +1261,7 @@ discard block |
||
1244 | 1261 | * Removes a control from the child collection of the control. |
1245 | 1262 | * Only framework developers should use this method. |
1246 | 1263 | * @param TControl the child control removed |
1264 | + * @param TControl $control |
|
1247 | 1265 | */ |
1248 | 1266 | public function removedControl($control) |
1249 | 1267 | { |
@@ -1495,6 +1513,7 @@ discard block |
||
1495 | 1513 | * @param string name of the broadcast event |
1496 | 1514 | * @param TControl sender of the event |
1497 | 1515 | * @param TBroadcastEventParameter event parameter |
1516 | + * @param TBroadcastEventParameter $param |
|
1498 | 1517 | */ |
1499 | 1518 | private function broadcastEventInternal($name,$sender,$param) |
1500 | 1519 | { |
@@ -1719,6 +1738,7 @@ discard block |
||
1719 | 1738 | * Clears the cached UniqueID. |
1720 | 1739 | * If $recursive=true, all children's cached UniqueID will be cleared as well. |
1721 | 1740 | * @param boolean whether the clearing is recursive. |
1741 | + * @param boolean $recursive |
|
1722 | 1742 | */ |
1723 | 1743 | private function clearCachedUniqueID($recursive) |
1724 | 1744 | { |
@@ -1756,6 +1776,7 @@ discard block |
||
1756 | 1776 | * Updates the list of the controls whose IDs are managed by the specified naming container. |
1757 | 1777 | * @param TControl the naming container |
1758 | 1778 | * @param TControlCollection list of controls |
1779 | + * @param TControl $container |
|
1759 | 1780 | * @throws TInvalidDataValueException if a control's ID is not unique within its naming container. |
1760 | 1781 | */ |
1761 | 1782 | private function fillNameTable($container,$controls) |
@@ -1925,6 +1946,7 @@ discard block |
||
1925 | 1946 | * The implementation of this function should raise appropriate event(s) (e.g. OnClick, OnCommand) |
1926 | 1947 | * indicating the component is responsible for the postback event. |
1927 | 1948 | * @param string the parameter associated with the postback event |
1949 | + * @return void |
|
1928 | 1950 | */ |
1929 | 1951 | public function raisePostBackEvent($param); |
1930 | 1952 | } |
@@ -1953,6 +1975,7 @@ discard block |
||
1953 | 1975 | * Raises postdata changed event. |
1954 | 1976 | * The implementation of this function should raise appropriate event(s) (e.g. OnTextChanged) |
1955 | 1977 | * indicating the control data is changed. |
1978 | + * @return void |
|
1956 | 1979 | */ |
1957 | 1980 | public function raisePostDataChangedEvent(); |
1958 | 1981 | /** |
@@ -1986,6 +2009,7 @@ discard block |
||
1986 | 2009 | public function getIsValid(); |
1987 | 2010 | /** |
1988 | 2011 | * @param boolean whether the validator validates successfully |
2012 | + * @return void |
|
1989 | 2013 | */ |
1990 | 2014 | public function setIsValid($value); |
1991 | 2015 | /** |
@@ -1994,6 +2018,7 @@ discard block |
||
1994 | 2018 | public function getErrorMessage(); |
1995 | 2019 | /** |
1996 | 2020 | * @param string error message for the validation |
2021 | + * @return void |
|
1997 | 2022 | */ |
1998 | 2023 | public function setErrorMessage($value); |
1999 | 2024 | } |
@@ -2061,6 +2086,7 @@ discard block |
||
2061 | 2086 | /** |
2062 | 2087 | * Applies this theme to the specified control. |
2063 | 2088 | * @param TControl the control to be applied with this theme |
2089 | + * @return boolean |
|
2064 | 2090 | */ |
2065 | 2091 | public function applySkin($control); |
2066 | 2092 | } |
@@ -2082,6 +2108,7 @@ discard block |
||
2082 | 2108 | * Content in the template will be instantiated as components and text strings |
2083 | 2109 | * and passed to the specified parent control. |
2084 | 2110 | * @param TControl the parent control |
2111 | + * @return void |
|
2085 | 2112 | */ |
2086 | 2113 | public function instantiateIn($parent); |
2087 | 2114 | } |
@@ -2106,6 +2133,8 @@ discard block |
||
2106 | 2133 | |
2107 | 2134 | /** |
2108 | 2135 | * @param string caption of the button |
2136 | + * @param string $value |
|
2137 | + * @return void |
|
2109 | 2138 | */ |
2110 | 2139 | public function setText($value); |
2111 | 2140 | |
@@ -2116,6 +2145,7 @@ discard block |
||
2116 | 2145 | |
2117 | 2146 | /** |
2118 | 2147 | * @param boolean whether postback event trigger by this button will cause input validation |
2148 | + * @return void |
|
2119 | 2149 | */ |
2120 | 2150 | public function setCausesValidation($value); |
2121 | 2151 | |
@@ -2126,6 +2156,7 @@ discard block |
||
2126 | 2156 | |
2127 | 2157 | /** |
2128 | 2158 | * @param string the command name associated with the {@link onCommand OnCommand} event. |
2159 | + * @return void |
|
2129 | 2160 | */ |
2130 | 2161 | public function setCommandName($value); |
2131 | 2162 | |
@@ -2136,6 +2167,7 @@ discard block |
||
2136 | 2167 | |
2137 | 2168 | /** |
2138 | 2169 | * @param string the parameter associated with the {@link onCommand OnCommand} event. |
2170 | + * @return void |
|
2139 | 2171 | */ |
2140 | 2172 | public function setCommandParameter($value); |
2141 | 2173 | |
@@ -2146,23 +2178,27 @@ discard block |
||
2146 | 2178 | |
2147 | 2179 | /** |
2148 | 2180 | * @param string the group of validators which the button causes validation upon postback |
2181 | + * @return void |
|
2149 | 2182 | */ |
2150 | 2183 | public function setValidationGroup($value); |
2151 | 2184 | |
2152 | 2185 | /** |
2153 | 2186 | * Raises <b>OnClick</b> event. |
2154 | 2187 | * @param TEventParameter event parameter to be passed to the event handlers |
2188 | + * @return void |
|
2155 | 2189 | */ |
2156 | 2190 | public function onClick($param); |
2157 | 2191 | |
2158 | 2192 | /** |
2159 | 2193 | * Raises <b>OnCommand</b> event. |
2160 | 2194 | * @param TCommandEventParameter event parameter to be passed to the event handlers |
2195 | + * @return void |
|
2161 | 2196 | */ |
2162 | 2197 | public function onCommand($param); |
2163 | 2198 | |
2164 | 2199 | /** |
2165 | 2200 | * @param boolean set by a panel to register this button as the default button for the panel. |
2201 | + * @return void |
|
2166 | 2202 | */ |
2167 | 2203 | public function setIsDefaultButton($value); |
2168 | 2204 |
@@ -77,6 +77,10 @@ discard block |
||
77 | 77 | } |
78 | 78 | exit(1); |
79 | 79 | } |
80 | + |
|
81 | + /** |
|
82 | + * @param TApplication $application |
|
83 | + */ |
|
80 | 84 | public static function setApplication($application) |
81 | 85 | { |
82 | 86 | if(self::$_application!==null && !defined('PRADO_TEST_RUN')) |
@@ -370,14 +374,26 @@ discard block |
||
370 | 374 | interface IModule |
371 | 375 | { |
372 | 376 | public function init($config); |
377 | + |
|
378 | + /** |
|
379 | + * @return string |
|
380 | + */ |
|
373 | 381 | public function getID(); |
374 | 382 | public function setID($id); |
375 | 383 | } |
376 | 384 | interface IService |
377 | 385 | { |
378 | 386 | public function init($config); |
387 | + |
|
388 | + /** |
|
389 | + * @return string |
|
390 | + */ |
|
379 | 391 | public function getID(); |
380 | 392 | public function setID($id); |
393 | + |
|
394 | + /** |
|
395 | + * @return boolean |
|
396 | + */ |
|
381 | 397 | public function getEnabled(); |
382 | 398 | public function setEnabled($value); |
383 | 399 | public function run(); |
@@ -389,14 +405,37 @@ discard block |
||
389 | 405 | } |
390 | 406 | interface IUser |
391 | 407 | { |
408 | + /** |
|
409 | + * @return string |
|
410 | + */ |
|
392 | 411 | public function getName(); |
393 | 412 | public function setName($value); |
413 | + |
|
414 | + /** |
|
415 | + * @return boolean |
|
416 | + */ |
|
394 | 417 | public function getIsGuest(); |
418 | + |
|
419 | + /** |
|
420 | + * @param boolean $value |
|
421 | + */ |
|
395 | 422 | public function setIsGuest($value); |
396 | 423 | public function getRoles(); |
397 | 424 | public function setRoles($value); |
425 | + |
|
426 | + /** |
|
427 | + * @return boolean |
|
428 | + */ |
|
398 | 429 | public function isInRole($role); |
430 | + |
|
431 | + /** |
|
432 | + * @return string |
|
433 | + */ |
|
399 | 434 | public function saveToString(); |
435 | + |
|
436 | + /** |
|
437 | + * @return IUser |
|
438 | + */ |
|
400 | 439 | public function loadFromString($string); |
401 | 440 | } |
402 | 441 | interface IStatePersister |
@@ -408,6 +447,12 @@ discard block |
||
408 | 447 | { |
409 | 448 | public function get($id); |
410 | 449 | public function set($id,$value,$expire=0,$dependency=null); |
450 | + |
|
451 | + /** |
|
452 | + * @param string $id |
|
453 | + * |
|
454 | + * @return boolean |
|
455 | + */ |
|
411 | 456 | public function add($id,$value,$expire=0,$dependency=null); |
412 | 457 | public function delete($id); |
413 | 458 | public function flush(); |
@@ -426,12 +471,22 @@ discard block |
||
426 | 471 | } |
427 | 472 | interface IStyleable |
428 | 473 | { |
474 | + /** |
|
475 | + * @return boolean |
|
476 | + */ |
|
429 | 477 | public function getHasStyle(); |
478 | + |
|
479 | + /** |
|
480 | + * @return TStyle |
|
481 | + */ |
|
430 | 482 | public function getStyle(); |
431 | 483 | public function clearStyle(); |
432 | 484 | } |
433 | 485 | interface IActiveControl |
434 | 486 | { |
487 | + /** |
|
488 | + * @return TBaseActiveControl |
|
489 | + */ |
|
435 | 490 | public function getActiveControl(); |
436 | 491 | } |
437 | 492 | interface ICallbackEventHandler |
@@ -441,6 +496,10 @@ discard block |
||
441 | 496 | interface IDataRenderer |
442 | 497 | { |
443 | 498 | public function getData(); |
499 | + |
|
500 | + /** |
|
501 | + * @param TActiveRecord $value |
|
502 | + */ |
|
444 | 503 | public function setData($value); |
445 | 504 | } |
446 | 505 | class TApplicationComponent extends TComponent |
@@ -469,6 +528,10 @@ discard block |
||
469 | 528 | { |
470 | 529 | return Prado::getApplication()->getUser(); |
471 | 530 | } |
531 | + |
|
532 | + /** |
|
533 | + * @param string $assetPath |
|
534 | + */ |
|
472 | 535 | public function publishAsset($assetPath,$className=null) |
473 | 536 | { |
474 | 537 | if($className===null) |
@@ -477,6 +540,10 @@ discard block |
||
477 | 540 | $fullPath=dirname($class->getFileName()).DIRECTORY_SEPARATOR.$assetPath; |
478 | 541 | return $this->publishFilePath($fullPath); |
479 | 542 | } |
543 | + |
|
544 | + /** |
|
545 | + * @param string $fullPath |
|
546 | + */ |
|
480 | 547 | public function publishFilePath($fullPath, $checkTimestamp=false) |
481 | 548 | { |
482 | 549 | return Prado::getApplication()->getAssetManager()->publishFilePath($fullPath, $checkTimestamp); |
@@ -508,6 +575,10 @@ discard block |
||
508 | 575 | { |
509 | 576 | return $this->_id; |
510 | 577 | } |
578 | + |
|
579 | + /** |
|
580 | + * @param string $value |
|
581 | + */ |
|
511 | 582 | public function setID($value) |
512 | 583 | { |
513 | 584 | $this->_id=$value; |
@@ -547,6 +618,10 @@ discard block |
||
547 | 618 | else |
548 | 619 | throw new TConfigurationException('errorhandler_errortemplatepath_invalid',$value); |
549 | 620 | } |
621 | + |
|
622 | + /** |
|
623 | + * @param null|TApplication $sender |
|
624 | + */ |
|
550 | 625 | public function handleError($sender,$param) |
551 | 626 | { |
552 | 627 | static $handling=false; |
@@ -569,6 +644,10 @@ discard block |
||
569 | 644 | $this->handleExternalError(500,$param); |
570 | 645 | } |
571 | 646 | } |
647 | + |
|
648 | + /** |
|
649 | + * @return string |
|
650 | + */ |
|
572 | 651 | protected static function hideSecurityRelated($value, $exception=null) |
573 | 652 | { |
574 | 653 | $aRpl = array(); |
@@ -588,6 +667,10 @@ discard block |
||
588 | 667 | $aRpl = array_reverse($aRpl, true); |
589 | 668 | return str_replace(array_keys($aRpl), $aRpl, $value); |
590 | 669 | } |
670 | + |
|
671 | + /** |
|
672 | + * @param integer $statusCode |
|
673 | + */ |
|
591 | 674 | protected function handleExternalError($statusCode,$exception) |
592 | 675 | { |
593 | 676 | if(!($exception instanceof THttpException)) |
@@ -721,6 +804,10 @@ discard block |
||
721 | 804 | return null; |
722 | 805 | return $result; |
723 | 806 | } |
807 | + |
|
808 | + /** |
|
809 | + * @param string $pattern |
|
810 | + */ |
|
724 | 811 | private function getPropertyAccessTrace($trace,$pattern) |
725 | 812 | { |
726 | 813 | $result=null; |
@@ -750,6 +837,10 @@ discard block |
||
750 | 837 | } |
751 | 838 | return $source; |
752 | 839 | } |
840 | + |
|
841 | + /** |
|
842 | + * @param string $message |
|
843 | + */ |
|
753 | 844 | private function addLink($message) |
754 | 845 | { |
755 | 846 | $baseUrl='http://pradosoft.github.io/docs/manual/class-'; |
@@ -771,6 +862,10 @@ discard block |
||
771 | 862 | { |
772 | 863 | return $this->_r; |
773 | 864 | } |
865 | + |
|
866 | + /** |
|
867 | + * @param boolean $value |
|
868 | + */ |
|
774 | 869 | protected function setReadOnly($value) |
775 | 870 | { |
776 | 871 | $this->_r=TPropertyValue::ensureBoolean($value); |
@@ -1017,9 +1112,27 @@ discard block |
||
1017 | 1112 | { |
1018 | 1113 | throw new TNotSupportedException('cache_flush_unsupported'); |
1019 | 1114 | } |
1115 | + |
|
1116 | + /** |
|
1117 | + * @param string $key |
|
1118 | + */ |
|
1020 | 1119 | abstract protected function getValue($key); |
1120 | + |
|
1121 | + /** |
|
1122 | + * @param string $key |
|
1123 | + * @param integer $expire |
|
1124 | + */ |
|
1021 | 1125 | abstract protected function setValue($key,$value,$expire); |
1126 | + |
|
1127 | + /** |
|
1128 | + * @param string $key |
|
1129 | + * @param integer $expire |
|
1130 | + */ |
|
1022 | 1131 | abstract protected function addValue($key,$value,$expire); |
1132 | + |
|
1133 | + /** |
|
1134 | + * @param string $key |
|
1135 | + */ |
|
1023 | 1136 | abstract protected function deleteValue($key); |
1024 | 1137 | public function offsetExists($id) |
1025 | 1138 | { |
@@ -1108,14 +1221,26 @@ discard block |
||
1108 | 1221 | { |
1109 | 1222 | return $this->generateTimestamps($this->_directory)!=$this->_timestamps; |
1110 | 1223 | } |
1224 | + |
|
1225 | + /** |
|
1226 | + * @param string $fileName |
|
1227 | + */ |
|
1111 | 1228 | protected function validateFile($fileName) |
1112 | 1229 | { |
1113 | 1230 | return true; |
1114 | 1231 | } |
1232 | + |
|
1233 | + /** |
|
1234 | + * @param string $directory |
|
1235 | + */ |
|
1115 | 1236 | protected function validateDirectory($directory) |
1116 | 1237 | { |
1117 | 1238 | return true; |
1118 | 1239 | } |
1240 | + |
|
1241 | + /** |
|
1242 | + * @param string $directory |
|
1243 | + */ |
|
1119 | 1244 | protected function generateTimestamps($directory,$level=0) |
1120 | 1245 | { |
1121 | 1246 | if(($dir=opendir($directory))===false) |
@@ -1206,6 +1331,10 @@ discard block |
||
1206 | 1331 | $this->_str=''; |
1207 | 1332 | return $str; |
1208 | 1333 | } |
1334 | + |
|
1335 | + /** |
|
1336 | + * @param string $str |
|
1337 | + */ |
|
1209 | 1338 | public function write($str) |
1210 | 1339 | { |
1211 | 1340 | $this->_str.=$str; |
@@ -1253,6 +1382,10 @@ discard block |
||
1253 | 1382 | { |
1254 | 1383 | return $this->_dp; |
1255 | 1384 | } |
1385 | + |
|
1386 | + /** |
|
1387 | + * @param integer $value |
|
1388 | + */ |
|
1256 | 1389 | protected function setDefaultPriority($value) |
1257 | 1390 | { |
1258 | 1391 | $this->_dp=(string)round(TPropertyValue::ensureFloat($value),$this->_p); |
@@ -1261,6 +1394,10 @@ discard block |
||
1261 | 1394 | { |
1262 | 1395 | return $this->_p; |
1263 | 1396 | } |
1397 | + |
|
1398 | + /** |
|
1399 | + * @param integer $value |
|
1400 | + */ |
|
1264 | 1401 | protected function setPrecision($value) |
1265 | 1402 | { |
1266 | 1403 | $this->_p=TPropertyValue::ensureInteger($value); |
@@ -1499,6 +1636,10 @@ discard block |
||
1499 | 1636 | $this->sortPriorities(); |
1500 | 1637 | return $this->_d; |
1501 | 1638 | } |
1639 | + |
|
1640 | + /** |
|
1641 | + * @param integer $priority |
|
1642 | + */ |
|
1502 | 1643 | public function toArrayBelowPriority($priority,$inclusive=false) |
1503 | 1644 | { |
1504 | 1645 | $this->sortPriorities(); |
@@ -1511,6 +1652,10 @@ discard block |
||
1511 | 1652 | } |
1512 | 1653 | return $items; |
1513 | 1654 | } |
1655 | + |
|
1656 | + /** |
|
1657 | + * @param integer $priority |
|
1658 | + */ |
|
1514 | 1659 | public function toArrayAbovePriority($priority,$inclusive=true) |
1515 | 1660 | { |
1516 | 1661 | $this->sortPriorities(); |
@@ -1608,6 +1753,10 @@ discard block |
||
1608 | 1753 | { |
1609 | 1754 | return $this->_r; |
1610 | 1755 | } |
1756 | + |
|
1757 | + /** |
|
1758 | + * @param boolean $value |
|
1759 | + */ |
|
1611 | 1760 | protected function setReadOnly($value) |
1612 | 1761 | { |
1613 | 1762 | $this->_r=TPropertyValue::ensureBoolean($value); |
@@ -1680,6 +1829,10 @@ discard block |
||
1680 | 1829 | else if($data!==null) |
1681 | 1830 | throw new TInvalidDataTypeException('map_data_not_iterable'); |
1682 | 1831 | } |
1832 | + |
|
1833 | + /** |
|
1834 | + * @param TMap $data |
|
1835 | + */ |
|
1683 | 1836 | public function mergeWith($data) |
1684 | 1837 | { |
1685 | 1838 | if(is_array($data) || $data instanceof Traversable) |
@@ -1731,6 +1884,10 @@ discard block |
||
1731 | 1884 | { |
1732 | 1885 | return $this->_r; |
1733 | 1886 | } |
1887 | + |
|
1888 | + /** |
|
1889 | + * @param boolean $value |
|
1890 | + */ |
|
1734 | 1891 | protected function setReadOnly($value) |
1735 | 1892 | { |
1736 | 1893 | $this->_r=TPropertyValue::ensureBoolean($value); |
@@ -1739,6 +1896,10 @@ discard block |
||
1739 | 1896 | { |
1740 | 1897 | return $this->_dp; |
1741 | 1898 | } |
1899 | + |
|
1900 | + /** |
|
1901 | + * @param integer $value |
|
1902 | + */ |
|
1742 | 1903 | protected function setDefaultPriority($value) |
1743 | 1904 | { |
1744 | 1905 | $this->_dp = (string)round(TPropertyValue::ensureFloat($value), $this->_p); |
@@ -1747,6 +1908,10 @@ discard block |
||
1747 | 1908 | { |
1748 | 1909 | return $this->_p; |
1749 | 1910 | } |
1911 | + |
|
1912 | + /** |
|
1913 | + * @param integer $value |
|
1914 | + */ |
|
1750 | 1915 | protected function setPrecision($value) |
1751 | 1916 | { |
1752 | 1917 | $this->_p=TPropertyValue::ensureInteger($value); |
@@ -2132,6 +2297,10 @@ discard block |
||
2132 | 2297 | { |
2133 | 2298 | return $this->_parent; |
2134 | 2299 | } |
2300 | + |
|
2301 | + /** |
|
2302 | + * @param TXmlElement|null $parent |
|
2303 | + */ |
|
2135 | 2304 | public function setParent($parent) |
2136 | 2305 | { |
2137 | 2306 | $this->_parent=$parent; |
@@ -2193,6 +2362,10 @@ discard block |
||
2193 | 2362 | } |
2194 | 2363 | return null; |
2195 | 2364 | } |
2365 | + |
|
2366 | + /** |
|
2367 | + * @param string $tagName |
|
2368 | + */ |
|
2196 | 2369 | public function getElementsByTagName($tagName) |
2197 | 2370 | { |
2198 | 2371 | $list=new TList; |
@@ -2262,6 +2435,10 @@ discard block |
||
2262 | 2435 | { |
2263 | 2436 | return $this->_version; |
2264 | 2437 | } |
2438 | + |
|
2439 | + /** |
|
2440 | + * @param string $version |
|
2441 | + */ |
|
2265 | 2442 | public function setVersion($version) |
2266 | 2443 | { |
2267 | 2444 | $this->_version=$version; |
@@ -2270,6 +2447,10 @@ discard block |
||
2270 | 2447 | { |
2271 | 2448 | return $this->_encoding; |
2272 | 2449 | } |
2450 | + |
|
2451 | + /** |
|
2452 | + * @param string $encoding |
|
2453 | + */ |
|
2273 | 2454 | public function setEncoding($encoding) |
2274 | 2455 | { |
2275 | 2456 | $this->_encoding=$encoding; |
@@ -2340,6 +2521,10 @@ discard block |
||
2340 | 2521 | { |
2341 | 2522 | return $this->saveToString(); |
2342 | 2523 | } |
2524 | + |
|
2525 | + /** |
|
2526 | + * @param DOMElement $node |
|
2527 | + */ |
|
2343 | 2528 | protected function buildElement($node) |
2344 | 2529 | { |
2345 | 2530 | $element=new TXmlElement($node->tagName); |
@@ -2498,10 +2683,18 @@ discard block |
||
2498 | 2683 | } |
2499 | 2684 | return 0; |
2500 | 2685 | } |
2686 | + |
|
2687 | + /** |
|
2688 | + * @param IUser $user |
|
2689 | + */ |
|
2501 | 2690 | private function isUserMatched($user) |
2502 | 2691 | { |
2503 | 2692 | return ($this->_everyone || ($this->_guest && $user->getIsGuest()) || ($this->_authenticated && !$user->getIsGuest()) || in_array(strtolower($user->getName()),$this->_users)); |
2504 | 2693 | } |
2694 | + |
|
2695 | + /** |
|
2696 | + * @param IUser $user |
|
2697 | + */ |
|
2505 | 2698 | private function isRoleMatched($user) |
2506 | 2699 | { |
2507 | 2700 | foreach($this->_roles as $role) |
@@ -2518,6 +2711,11 @@ discard block |
||
2518 | 2711 | } |
2519 | 2712 | class TAuthorizationRuleCollection extends TList |
2520 | 2713 | { |
2714 | + /** |
|
2715 | + * @param IUser $user |
|
2716 | + * @param string $verb |
|
2717 | + * @param string $ip |
|
2718 | + */ |
|
2521 | 2719 | public function isUserAllowed($user,$verb,$ip) |
2522 | 2720 | { |
2523 | 2721 | if($user instanceof IUser) |
@@ -2625,6 +2823,10 @@ discard block |
||
2625 | 2823 | { |
2626 | 2824 | $this->_cryptAlgorithm = $value; |
2627 | 2825 | } |
2826 | + |
|
2827 | + /** |
|
2828 | + * @param string $data |
|
2829 | + */ |
|
2628 | 2830 | public function encrypt($data) |
2629 | 2831 | { |
2630 | 2832 | $module=$this->openCryptModule(); |
@@ -2637,6 +2839,10 @@ discard block |
||
2637 | 2839 | mcrypt_module_close($module); |
2638 | 2840 | return $encrypted; |
2639 | 2841 | } |
2842 | + |
|
2843 | + /** |
|
2844 | + * @param string $data |
|
2845 | + */ |
|
2640 | 2846 | public function decrypt($data) |
2641 | 2847 | { |
2642 | 2848 | $module=$this->openCryptModule(); |
@@ -2698,6 +2904,11 @@ discard block |
||
2698 | 2904 | { |
2699 | 2905 | return $this->_mbstring ? mb_strlen($string,'8bit') : strlen($string); |
2700 | 2906 | } |
2907 | + |
|
2908 | + /** |
|
2909 | + * @param integer $start |
|
2910 | + * @param integer $length |
|
2911 | + */ |
|
2701 | 2912 | private function substr($string,$start,$length) |
2702 | 2913 | { |
2703 | 2914 | return $this->_mbstring ? mb_substr($string,$start,$length,'8bit') : substr($string,$start,$length); |
@@ -2857,6 +3068,10 @@ discard block |
||
2857 | 3068 | self::checkJsonError(); |
2858 | 3069 | return $s; |
2859 | 3070 | } |
3071 | + |
|
3072 | + /** |
|
3073 | + * @param string $sourceEncoding |
|
3074 | + */ |
|
2860 | 3075 | private static function convertToUtf8(&$value, $sourceEncoding) { |
2861 | 3076 | if(is_string($value)) |
2862 | 3077 | $value=iconv($sourceEncoding, 'UTF-8', $value); |
@@ -2866,6 +3081,10 @@ discard block |
||
2866 | 3081 | self::convertToUtf8($element, $sourceEncoding); |
2867 | 3082 | } |
2868 | 3083 | } |
3084 | + |
|
3085 | + /** |
|
3086 | + * @param string $value |
|
3087 | + */ |
|
2869 | 3088 | public static function jsonDecode($value, $assoc = false, $depth = 512) |
2870 | 3089 | { |
2871 | 3090 | $s= @json_decode($value, $assoc, $depth); |
@@ -2900,6 +3119,10 @@ discard block |
||
2900 | 3119 | } |
2901 | 3120 | throw new Exception("JSON error ($err): $msg"); |
2902 | 3121 | } |
3122 | + |
|
3123 | + /** |
|
3124 | + * @param string $code |
|
3125 | + */ |
|
2903 | 3126 | public static function JSMin($code) |
2904 | 3127 | { |
2905 | 3128 | Prado::using('System.Web.Javascripts.JSMin'); |
@@ -3087,6 +3310,10 @@ discard block |
||
3087 | 3310 | { |
3088 | 3311 | return $this->getID(); |
3089 | 3312 | } |
3313 | + |
|
3314 | + /** |
|
3315 | + * @param TUrlManager $manager |
|
3316 | + */ |
|
3090 | 3317 | protected function cacheUrlManager($manager) |
3091 | 3318 | { |
3092 | 3319 | if($this->getEnableCache()) |
@@ -3336,6 +3563,10 @@ discard block |
||
3336 | 3563 | { |
3337 | 3564 | return $_ENV; |
3338 | 3565 | } |
3566 | + |
|
3567 | + /** |
|
3568 | + * @param string $serviceID |
|
3569 | + */ |
|
3339 | 3570 | public function constructUrl($serviceID,$serviceParam,$getItems=null,$encodeAmpersand=true,$encodeGetItems=true) |
3340 | 3571 | { |
3341 | 3572 | if ($this->_cookieOnly===null) |
@@ -3456,6 +3687,10 @@ discard block |
||
3456 | 3687 | class THttpCookieCollection extends TList |
3457 | 3688 | { |
3458 | 3689 | private $_o; |
3690 | + |
|
3691 | + /** |
|
3692 | + * @param THttpResponse $owner |
|
3693 | + */ |
|
3459 | 3694 | public function __construct($owner=null) |
3460 | 3695 | { |
3461 | 3696 | $this->_o=$owner; |
@@ -3519,6 +3754,10 @@ discard block |
||
3519 | 3754 | { |
3520 | 3755 | return $this->_expire; |
3521 | 3756 | } |
3757 | + |
|
3758 | + /** |
|
3759 | + * @param integer $value |
|
3760 | + */ |
|
3522 | 3761 | public function setExpire($value) |
3523 | 3762 | { |
3524 | 3763 | $this->_expire=TPropertyValue::ensureInteger($value); |
@@ -3585,6 +3824,10 @@ discard block |
||
3585 | 3824 | private $_query; |
3586 | 3825 | private $_fragment; |
3587 | 3826 | private $_uri; |
3827 | + |
|
3828 | + /** |
|
3829 | + * @param string $uri |
|
3830 | + */ |
|
3588 | 3831 | public function __construct($uri) |
3589 | 3832 | { |
3590 | 3833 | if(($ret=@parse_url($uri))!==false) |
@@ -3650,6 +3893,10 @@ discard block |
||
3650 | 3893 | class THttpResponseAdapter extends TApplicationComponent |
3651 | 3894 | { |
3652 | 3895 | private $_response; |
3896 | + |
|
3897 | + /** |
|
3898 | + * @param THttpResponse $response |
|
3899 | + */ |
|
3653 | 3900 | public function __construct($response) |
3654 | 3901 | { |
3655 | 3902 | $this->_response=$response; |
@@ -3745,6 +3992,10 @@ discard block |
||
3745 | 3992 | { |
3746 | 3993 | return $this->_charset; |
3747 | 3994 | } |
3995 | + |
|
3996 | + /** |
|
3997 | + * @param string $charset |
|
3998 | + */ |
|
3748 | 3999 | public function setCharset($charset) |
3749 | 4000 | { |
3750 | 4001 | $this->_charset = (strToLower($charset) === 'false') ? false : (string)$charset; |
@@ -3968,6 +4219,10 @@ discard block |
||
3968 | 4219 | return array_change_key_case($result, $case); |
3969 | 4220 | return $result; |
3970 | 4221 | } |
4222 | + |
|
4223 | + /** |
|
4224 | + * @param string $value |
|
4225 | + */ |
|
3971 | 4226 | public function appendHeader($value, $replace=true) |
3972 | 4227 | { |
3973 | 4228 | header($value, $replace); |
@@ -3976,6 +4231,10 @@ discard block |
||
3976 | 4231 | { |
3977 | 4232 | error_log($message,$messageType,$destination,$extraHeaders); |
3978 | 4233 | } |
4234 | + |
|
4235 | + /** |
|
4236 | + * @param THttpCookie $cookie |
|
4237 | + */ |
|
3979 | 4238 | public function addCookie($cookie) |
3980 | 4239 | { |
3981 | 4240 | $request=$this->getRequest(); |
@@ -4033,6 +4292,10 @@ discard block |
||
4033 | 4292 | else |
4034 | 4293 | return $this->createNewHtmlWriter($type, $this); |
4035 | 4294 | } |
4295 | + |
|
4296 | + /** |
|
4297 | + * @param THttpResponse $writer |
|
4298 | + */ |
|
4036 | 4299 | public function createNewHtmlWriter($type, $writer) |
4037 | 4300 | { |
4038 | 4301 | return Prado::createComponent($type, $writer); |
@@ -4142,6 +4405,10 @@ discard block |
||
4142 | 4405 | { |
4143 | 4406 | return $this->_customStorage; |
4144 | 4407 | } |
4408 | + |
|
4409 | + /** |
|
4410 | + * @param boolean $value |
|
4411 | + */ |
|
4145 | 4412 | public function setUseCustomStorage($value) |
4146 | 4413 | { |
4147 | 4414 | $this->_customStorage=TPropertyValue::ensureBoolean($value); |
@@ -4284,10 +4551,18 @@ discard block |
||
4284 | 4551 | { |
4285 | 4552 | return array_keys($_SESSION); |
4286 | 4553 | } |
4554 | + |
|
4555 | + /** |
|
4556 | + * @param string $key |
|
4557 | + */ |
|
4287 | 4558 | public function itemAt($key) |
4288 | 4559 | { |
4289 | 4560 | return isset($_SESSION[$key]) ? $_SESSION[$key] : null; |
4290 | 4561 | } |
4562 | + |
|
4563 | + /** |
|
4564 | + * @param string $key |
|
4565 | + */ |
|
4291 | 4566 | public function add($key,$value) |
4292 | 4567 | { |
4293 | 4568 | $_SESSION[$key]=$value; |
@@ -4394,6 +4669,10 @@ discard block |
||
4394 | 4669 | { |
4395 | 4670 | return $this->_caseSensitive; |
4396 | 4671 | } |
4672 | + |
|
4673 | + /** |
|
4674 | + * @param boolean $value |
|
4675 | + */ |
|
4397 | 4676 | public function setCaseSensitive($value) |
4398 | 4677 | { |
4399 | 4678 | $this->_caseSensitive=TPropertyValue::ensureBoolean($value); |
@@ -4406,6 +4685,10 @@ discard block |
||
4406 | 4685 | { |
4407 | 4686 | parent::add($this->_caseSensitive?$key:strtolower($key),$value); |
4408 | 4687 | } |
4688 | + |
|
4689 | + /** |
|
4690 | + * @param string $key |
|
4691 | + */ |
|
4409 | 4692 | public function remove($key) |
4410 | 4693 | { |
4411 | 4694 | return parent::remove($this->_caseSensitive?$key:strtolower($key)); |
@@ -4563,6 +4846,10 @@ discard block |
||
4563 | 4846 | } |
4564 | 4847 | return $this->_page; |
4565 | 4848 | } |
4849 | + |
|
4850 | + /** |
|
4851 | + * @param TPage $page |
|
4852 | + */ |
|
4566 | 4853 | public function setPage($page) |
4567 | 4854 | { |
4568 | 4855 | $this->_page=$page; |
@@ -4706,6 +4993,10 @@ discard block |
||
4706 | 4993 | else |
4707 | 4994 | return $this->getViewState('Visible',true); |
4708 | 4995 | } |
4996 | + |
|
4997 | + /** |
|
4998 | + * @param boolean $value |
|
4999 | + */ |
|
4709 | 5000 | public function setVisible($value) |
4710 | 5001 | { |
4711 | 5002 | $this->setViewState('Visible',TPropertyValue::ensureBoolean($value),true); |
@@ -4744,6 +5035,10 @@ discard block |
||
4744 | 5035 | return $attributes; |
4745 | 5036 | } |
4746 | 5037 | } |
5038 | + |
|
5039 | + /** |
|
5040 | + * @param string $name |
|
5041 | + */ |
|
4747 | 5042 | public function hasAttribute($name) |
4748 | 5043 | { |
4749 | 5044 | if($attributes=$this->getViewState('Attributes',null)) |
@@ -4751,6 +5046,10 @@ discard block |
||
4751 | 5046 | else |
4752 | 5047 | return false; |
4753 | 5048 | } |
5049 | + |
|
5050 | + /** |
|
5051 | + * @param string $name |
|
5052 | + */ |
|
4754 | 5053 | public function getAttribute($name) |
4755 | 5054 | { |
4756 | 5055 | if($attributes=$this->getViewState('Attributes',null)) |
@@ -4758,6 +5057,10 @@ discard block |
||
4758 | 5057 | else |
4759 | 5058 | return null; |
4760 | 5059 | } |
5060 | + |
|
5061 | + /** |
|
5062 | + * @param string $name |
|
5063 | + */ |
|
4761 | 5064 | public function setAttribute($name,$value) |
4762 | 5065 | { |
4763 | 5066 | $this->getAttributes()->add($name,$value); |
@@ -4781,6 +5084,10 @@ discard block |
||
4781 | 5084 | else |
4782 | 5085 | return !($this->_flags & self::IS_DISABLE_VIEWSTATE); |
4783 | 5086 | } |
5087 | + |
|
5088 | + /** |
|
5089 | + * @param boolean $value |
|
5090 | + */ |
|
4784 | 5091 | public function setEnableViewState($value) |
4785 | 5092 | { |
4786 | 5093 | if(TPropertyValue::ensureBoolean($value)) |
@@ -4788,10 +5095,20 @@ discard block |
||
4788 | 5095 | else |
4789 | 5096 | $this->_flags |= self::IS_DISABLE_VIEWSTATE; |
4790 | 5097 | } |
5098 | + |
|
5099 | + /** |
|
5100 | + * @param string $key |
|
5101 | + * @param integer $defaultValue |
|
5102 | + */ |
|
4791 | 5103 | protected function getControlState($key,$defaultValue=null) |
4792 | 5104 | { |
4793 | 5105 | return isset($this->_rf[self::RF_CONTROLSTATE][$key])?$this->_rf[self::RF_CONTROLSTATE][$key]:$defaultValue; |
4794 | 5106 | } |
5107 | + |
|
5108 | + /** |
|
5109 | + * @param string $key |
|
5110 | + * @param integer $defaultValue |
|
5111 | + */ |
|
4795 | 5112 | protected function setControlState($key,$value,$defaultValue=null) |
4796 | 5113 | { |
4797 | 5114 | if($value===$defaultValue) |
@@ -4803,6 +5120,10 @@ discard block |
||
4803 | 5120 | { |
4804 | 5121 | unset($this->_rf[self::RF_CONTROLSTATE][$key]); |
4805 | 5122 | } |
5123 | + |
|
5124 | + /** |
|
5125 | + * @param boolean $enabled |
|
5126 | + */ |
|
4806 | 5127 | public function trackViewState($enabled) |
4807 | 5128 | { |
4808 | 5129 | $this->_trackViewState=TPropertyValue::ensureBoolean($enabled); |
@@ -4820,6 +5141,10 @@ discard block |
||
4820 | 5141 | else |
4821 | 5142 | return $defaultValue; |
4822 | 5143 | } |
5144 | + |
|
5145 | + /** |
|
5146 | + * @param string $key |
|
5147 | + */ |
|
4823 | 5148 | public function setViewState($key,$value,$defaultValue=null) |
4824 | 5149 | { |
4825 | 5150 | if($this->_trackViewState) |
@@ -4839,6 +5164,10 @@ discard block |
||
4839 | 5164 | $this->_tempState[$key]=$value; |
4840 | 5165 | } |
4841 | 5166 | } |
5167 | + |
|
5168 | + /** |
|
5169 | + * @param string $key |
|
5170 | + */ |
|
4842 | 5171 | public function clearViewState($key) |
4843 | 5172 | { |
4844 | 5173 | unset($this->_viewState[$key]); |
@@ -4895,6 +5224,10 @@ discard block |
||
4895 | 5224 | { |
4896 | 5225 | return ($this->_flags & self::IS_CHILD_CREATED)!==0; |
4897 | 5226 | } |
5227 | + |
|
5228 | + /** |
|
5229 | + * @param boolean $value |
|
5230 | + */ |
|
4898 | 5231 | final protected function setChildControlsCreated($value) |
4899 | 5232 | { |
4900 | 5233 | if($value) |
@@ -4954,6 +5287,10 @@ discard block |
||
4954 | 5287 | return null; |
4955 | 5288 | } |
4956 | 5289 | } |
5290 | + |
|
5291 | + /** |
|
5292 | + * @param string $type |
|
5293 | + */ |
|
4957 | 5294 | public function findControlsByType($type,$strict=true) |
4958 | 5295 | { |
4959 | 5296 | $controls=array(); |
@@ -4991,6 +5328,10 @@ discard block |
||
4991 | 5328 | unset($this->_rf[self::RF_NAMED_CONTROLS_ID]); |
4992 | 5329 | $this->clearNameTable(); |
4993 | 5330 | } |
5331 | + |
|
5332 | + /** |
|
5333 | + * @param TCheckBox $object |
|
5334 | + */ |
|
4994 | 5335 | public function registerObject($name,$object) |
4995 | 5336 | { |
4996 | 5337 | if(isset($this->_rf[self::RF_NAMED_OBJECTS][$name])) |
@@ -5025,6 +5366,10 @@ discard block |
||
5025 | 5366 | { |
5026 | 5367 | return $this->getControlStage() >= self::CS_PRERENDERED; |
5027 | 5368 | } |
5369 | + |
|
5370 | + /** |
|
5371 | + * @param string $name |
|
5372 | + */ |
|
5028 | 5373 | public function getRegisteredObject($name) |
5029 | 5374 | { |
5030 | 5375 | return isset($this->_rf[self::RF_NAMED_OBJECTS][$name])?$this->_rf[self::RF_NAMED_OBJECTS][$name]:null; |
@@ -5048,6 +5393,10 @@ discard block |
||
5048 | 5393 | $control=$control->_parent; |
5049 | 5394 | return $control===$ancestor; |
5050 | 5395 | } |
5396 | + |
|
5397 | + /** |
|
5398 | + * @param TControl $control |
|
5399 | + */ |
|
5051 | 5400 | public function addedControl($control) |
5052 | 5401 | { |
5053 | 5402 | if($control->_parent) |
@@ -5086,6 +5435,10 @@ discard block |
||
5086 | 5435 | } |
5087 | 5436 | } |
5088 | 5437 | } |
5438 | + |
|
5439 | + /** |
|
5440 | + * @param TControl $control |
|
5441 | + */ |
|
5089 | 5442 | public function removedControl($control) |
5090 | 5443 | { |
5091 | 5444 | if($this->_namingContainer) |
@@ -5231,6 +5584,10 @@ discard block |
||
5231 | 5584 | $rootControl=(($page=$this->getPage())===null)?$this:$page; |
5232 | 5585 | $rootControl->broadcastEventInternal($name,$sender,new TBroadcastEventParameter($name,$param)); |
5233 | 5586 | } |
5587 | + |
|
5588 | + /** |
|
5589 | + * @param TBroadcastEventParameter $param |
|
5590 | + */ |
|
5234 | 5591 | private function broadcastEventInternal($name,$sender,$param) |
5235 | 5592 | { |
5236 | 5593 | if($this->hasEvent($name)) |
@@ -5376,6 +5733,10 @@ discard block |
||
5376 | 5733 | else if($this->_flags & self::IS_STYLESHEET_APPLIED) |
5377 | 5734 | throw new TInvalidOperationException('control_stylesheet_applied',get_class($this)); |
5378 | 5735 | } |
5736 | + |
|
5737 | + /** |
|
5738 | + * @param boolean $recursive |
|
5739 | + */ |
|
5379 | 5740 | private function clearCachedUniqueID($recursive) |
5380 | 5741 | { |
5381 | 5742 | if($recursive && $this->_uid!==null && isset($this->_rf[self::RF_CONTROLS])) |
@@ -5399,6 +5760,10 @@ discard block |
||
5399 | 5760 | { |
5400 | 5761 | unset($this->_rf[self::RF_NAMED_CONTROLS]); |
5401 | 5762 | } |
5763 | + |
|
5764 | + /** |
|
5765 | + * @param TControl $container |
|
5766 | + */ |
|
5402 | 5767 | private function fillNameTable($container,$controls) |
5403 | 5768 | { |
5404 | 5769 | foreach($controls as $control) |
@@ -5471,11 +5836,18 @@ discard block |
||
5471 | 5836 | } |
5472 | 5837 | interface IPostBackEventHandler |
5473 | 5838 | { |
5839 | + /** |
|
5840 | + * @return void |
|
5841 | + */ |
|
5474 | 5842 | public function raisePostBackEvent($param); |
5475 | 5843 | } |
5476 | 5844 | interface IPostBackDataHandler |
5477 | 5845 | { |
5478 | 5846 | public function loadPostData($key,$values); |
5847 | + |
|
5848 | + /** |
|
5849 | + * @return void |
|
5850 | + */ |
|
5479 | 5851 | public function raisePostDataChangedEvent(); |
5480 | 5852 | public function getDataChanged(); |
5481 | 5853 | } |
@@ -5483,8 +5855,16 @@ discard block |
||
5483 | 5855 | { |
5484 | 5856 | public function validate(); |
5485 | 5857 | public function getIsValid(); |
5858 | + |
|
5859 | + /** |
|
5860 | + * @return void |
|
5861 | + */ |
|
5486 | 5862 | public function setIsValid($value); |
5487 | 5863 | public function getErrorMessage(); |
5864 | + |
|
5865 | + /** |
|
5866 | + * @return void |
|
5867 | + */ |
|
5488 | 5868 | public function setErrorMessage($value); |
5489 | 5869 | } |
5490 | 5870 | interface IValidatable |
@@ -5499,26 +5879,66 @@ discard block |
||
5499 | 5879 | } |
5500 | 5880 | interface ITheme |
5501 | 5881 | { |
5882 | + /** |
|
5883 | + * @return boolean |
|
5884 | + */ |
|
5502 | 5885 | public function applySkin($control); |
5503 | 5886 | } |
5504 | 5887 | interface ITemplate |
5505 | 5888 | { |
5889 | + /** |
|
5890 | + * @return void |
|
5891 | + */ |
|
5506 | 5892 | public function instantiateIn($parent); |
5507 | 5893 | } |
5508 | 5894 | interface IButtonControl |
5509 | 5895 | { |
5510 | 5896 | public function getText(); |
5897 | + |
|
5898 | + /** |
|
5899 | + * @param string $value |
|
5900 | + * |
|
5901 | + * @return void |
|
5902 | + */ |
|
5511 | 5903 | public function setText($value); |
5512 | 5904 | public function getCausesValidation(); |
5905 | + |
|
5906 | + /** |
|
5907 | + * @return void |
|
5908 | + */ |
|
5513 | 5909 | public function setCausesValidation($value); |
5514 | 5910 | public function getCommandName(); |
5911 | + |
|
5912 | + /** |
|
5913 | + * @return void |
|
5914 | + */ |
|
5515 | 5915 | public function setCommandName($value); |
5516 | 5916 | public function getCommandParameter(); |
5917 | + |
|
5918 | + /** |
|
5919 | + * @return void |
|
5920 | + */ |
|
5517 | 5921 | public function setCommandParameter($value); |
5518 | 5922 | public function getValidationGroup(); |
5923 | + |
|
5924 | + /** |
|
5925 | + * @return void |
|
5926 | + */ |
|
5519 | 5927 | public function setValidationGroup($value); |
5928 | + |
|
5929 | + /** |
|
5930 | + * @return void |
|
5931 | + */ |
|
5520 | 5932 | public function onClick($param); |
5933 | + |
|
5934 | + /** |
|
5935 | + * @return void |
|
5936 | + */ |
|
5521 | 5937 | public function onCommand($param); |
5938 | + |
|
5939 | + /** |
|
5940 | + * @return void |
|
5941 | + */ |
|
5522 | 5942 | public function setIsDefaultButton($value); |
5523 | 5943 | public function getIsDefaultButton(); |
5524 | 5944 | } |
@@ -5977,6 +6397,10 @@ discard block |
||
5977 | 6397 | { |
5978 | 6398 | return $this->_customStyle===null?'':$this->_customStyle; |
5979 | 6399 | } |
6400 | + |
|
6401 | + /** |
|
6402 | + * @param string $value |
|
6403 | + */ |
|
5980 | 6404 | public function setCustomStyle($value) |
5981 | 6405 | { |
5982 | 6406 | $this->_customStyle=$value; |
@@ -5985,6 +6409,11 @@ discard block |
||
5985 | 6409 | { |
5986 | 6410 | return isset($this->_fields[$name])?$this->_fields[$name]:''; |
5987 | 6411 | } |
6412 | + |
|
6413 | + /** |
|
6414 | + * @param string $name |
|
6415 | + * @param string $value |
|
6416 | + */ |
|
5988 | 6417 | public function setStyleField($name,$value) |
5989 | 6418 | { |
5990 | 6419 | $this->_fields[$name]=$value; |
@@ -6480,6 +6909,10 @@ discard block |
||
6480 | 6909 | { |
6481 | 6910 | private $_ensureid=false; |
6482 | 6911 | protected $_decorator; |
6912 | + |
|
6913 | + /** |
|
6914 | + * @param boolean $value |
|
6915 | + */ |
|
6483 | 6916 | public function setEnsureId($value) |
6484 | 6917 | { |
6485 | 6918 | $this->_ensureid |= TPropertyValue::ensureBoolean($value); |
@@ -6569,6 +7002,10 @@ discard block |
||
6569 | 7002 | else |
6570 | 7003 | return ''; |
6571 | 7004 | } |
7005 | + |
|
7006 | + /** |
|
7007 | + * @param string $value |
|
7008 | + */ |
|
6572 | 7009 | public function setForeColor($value) |
6573 | 7010 | { |
6574 | 7011 | $this->getStyle()->setForeColor($value); |
@@ -6599,6 +7036,10 @@ discard block |
||
6599 | 7036 | else |
6600 | 7037 | return ''; |
6601 | 7038 | } |
7039 | + |
|
7040 | + /** |
|
7041 | + * @param string $value |
|
7042 | + */ |
|
6602 | 7043 | public function setHeight($value) |
6603 | 7044 | { |
6604 | 7045 | $this->getStyle()->setHeight($value); |
@@ -6660,6 +7101,10 @@ discard block |
||
6660 | 7101 | else |
6661 | 7102 | return ''; |
6662 | 7103 | } |
7104 | + |
|
7105 | + /** |
|
7106 | + * @param string $value |
|
7107 | + */ |
|
6663 | 7108 | public function setWidth($value) |
6664 | 7109 | { |
6665 | 7110 | $this->getStyle()->setWidth($value); |
@@ -6787,6 +7232,10 @@ discard block |
||
6787 | 7232 | $tpl->instantiateIn($this); |
6788 | 7233 | } |
6789 | 7234 | } |
7235 | + |
|
7236 | + /** |
|
7237 | + * @param string $id |
|
7238 | + */ |
|
6790 | 7239 | public function registerContent($id,TContent $object) |
6791 | 7240 | { |
6792 | 7241 | if(isset($this->_contents[$id])) |
@@ -6794,6 +7243,10 @@ discard block |
||
6794 | 7243 | else |
6795 | 7244 | $this->_contents[$id]=$object; |
6796 | 7245 | } |
7246 | + |
|
7247 | + /** |
|
7248 | + * @param string $id |
|
7249 | + */ |
|
6797 | 7250 | public function registerContentPlaceHolder($id,TContentPlaceHolder $object) |
6798 | 7251 | { |
6799 | 7252 | if(isset($this->_placeholders[$id])) |
@@ -6990,6 +7443,10 @@ discard block |
||
6990 | 7443 | { |
6991 | 7444 | return $this->getViewState('Enctype',''); |
6992 | 7445 | } |
7446 | + |
|
7447 | + /** |
|
7448 | + * @param string $value |
|
7449 | + */ |
|
6993 | 7450 | public function setEnctype($value) |
6994 | 7451 | { |
6995 | 7452 | $this->setViewState('Enctype',$value,''); |
@@ -7114,6 +7571,10 @@ discard block |
||
7114 | 7571 | $scripts = array_unique($scripts); |
7115 | 7572 | return $scripts; |
7116 | 7573 | } |
7574 | + |
|
7575 | + /** |
|
7576 | + * @param string $base |
|
7577 | + */ |
|
7117 | 7578 | protected function getPackagePathUrl($base) |
7118 | 7579 | { |
7119 | 7580 | $assets = Prado::getApplication()->getAssetManager(); |
@@ -7309,6 +7770,11 @@ discard block |
||
7309 | 7770 | $params=func_get_args(); |
7310 | 7771 | $this->_page->registerCachingAction('Page.ClientScript','registerEndScript',$params); |
7311 | 7772 | } |
7773 | + |
|
7774 | + /** |
|
7775 | + * @param string $name |
|
7776 | + * @param string $value |
|
7777 | + */ |
|
7312 | 7778 | public function registerHiddenField($name,$value) |
7313 | 7779 | { |
7314 | 7780 | $this->_hiddenFields[$name]=$value; |
@@ -7446,6 +7912,10 @@ discard block |
||
7446 | 7912 | $this->renderAllPendingScriptFiles($writer); |
7447 | 7913 | } |
7448 | 7914 | } |
7915 | + |
|
7916 | + /** |
|
7917 | + * @param boolean $initial |
|
7918 | + */ |
|
7449 | 7919 | protected function renderHiddenFieldsInt($writer, $initial) |
7450 | 7920 | { |
7451 | 7921 | if ($initial) $this->_renderedHiddenFields = array(); |
@@ -7481,12 +7951,20 @@ discard block |
||
7481 | 7951 | abstract class TClientSideOptions extends TComponent |
7482 | 7952 | { |
7483 | 7953 | private $_options; |
7954 | + |
|
7955 | + /** |
|
7956 | + * @param string $name |
|
7957 | + */ |
|
7484 | 7958 | protected function setFunction($name, $code) |
7485 | 7959 | { |
7486 | 7960 | if(!TJavaScript::isJsLiteral($code)) |
7487 | 7961 | $code = TJavaScript::quoteJsLiteral($this->ensureFunction($code)); |
7488 | 7962 | $this->setOption($name, $code); |
7489 | 7963 | } |
7964 | + |
|
7965 | + /** |
|
7966 | + * @param string $name |
|
7967 | + */ |
|
7490 | 7968 | protected function getOption($name) |
7491 | 7969 | { |
7492 | 7970 | if ($this->_options) |
@@ -7609,6 +8087,10 @@ discard block |
||
7609 | 8087 | $this->renderControl($writer); |
7610 | 8088 | $this->unloadRecursive(); |
7611 | 8089 | } |
8090 | + |
|
8091 | + /** |
|
8092 | + * @param string $enc |
|
8093 | + */ |
|
7612 | 8094 | protected static function decodeUTF8($data, $enc) |
7613 | 8095 | { |
7614 | 8096 | if(is_array($data)) |
@@ -7691,6 +8173,10 @@ discard block |
||
7691 | 8173 | else |
7692 | 8174 | throw new TInvalidOperationException('page_form_duplicated'); |
7693 | 8175 | } |
8176 | + |
|
8177 | + /** |
|
8178 | + * @param string $validationGroup |
|
8179 | + */ |
|
7694 | 8180 | public function getValidators($validationGroup=null) |
7695 | 8181 | { |
7696 | 8182 | if(!$this->_validators) |
@@ -7761,6 +8247,10 @@ discard block |
||
7761 | 8247 | { |
7762 | 8248 | $this->_styleSheet=empty($value)?null:$value; |
7763 | 8249 | } |
8250 | + |
|
8251 | + /** |
|
8252 | + * @param TControl $control |
|
8253 | + */ |
|
7764 | 8254 | public function applyControlSkin($control) |
7765 | 8255 | { |
7766 | 8256 | if(($theme=$this->getTheme())!==null) |
@@ -7908,6 +8398,10 @@ discard block |
||
7908 | 8398 | { |
7909 | 8399 | $this->_postBackEventParameter=$value; |
7910 | 8400 | } |
8401 | + |
|
8402 | + /** |
|
8403 | + * @param boolean $beforeLoad |
|
8404 | + */ |
|
7911 | 8405 | protected function processPostData($postData,$beforeLoad) |
7912 | 8406 | { |
7913 | 8407 | $this->_isLoadingPostData=true; |
@@ -7996,6 +8490,10 @@ discard block |
||
7996 | 8490 | $this->getClientScript()->registerFocusControl($lastFocus); |
7997 | 8491 | $this->_inFormRender=false; |
7998 | 8492 | } |
8493 | + |
|
8494 | + /** |
|
8495 | + * @param TControl $value |
|
8496 | + */ |
|
7999 | 8497 | public function setFocus($value) |
8000 | 8498 | { |
8001 | 8499 | $this->_focus=$value; |
@@ -8041,6 +8539,10 @@ discard block |
||
8041 | 8539 | { |
8042 | 8540 | return $this->_clientState; |
8043 | 8541 | } |
8542 | + |
|
8543 | + /** |
|
8544 | + * @param string $state |
|
8545 | + */ |
|
8044 | 8546 | public function setClientState($state) |
8045 | 8547 | { |
8046 | 8548 | $this->_clientState=$state; |
@@ -8100,6 +8602,11 @@ discard block |
||
8100 | 8602 | { |
8101 | 8603 | $this->_pagePath=$value; |
8102 | 8604 | } |
8605 | + |
|
8606 | + /** |
|
8607 | + * @param string $context |
|
8608 | + * @param string $funcName |
|
8609 | + */ |
|
8103 | 8610 | public function registerCachingAction($context,$funcName,$funcParams) |
8104 | 8611 | { |
8105 | 8612 | if($this->_cachingStack) |
@@ -8122,13 +8629,27 @@ discard block |
||
8122 | 8629 | } |
8123 | 8630 | interface IPageStatePersister |
8124 | 8631 | { |
8632 | + /** |
|
8633 | + * @return TPage |
|
8634 | + */ |
|
8125 | 8635 | public function getPage(); |
8636 | + |
|
8637 | + /** |
|
8638 | + * @return void |
|
8639 | + */ |
|
8126 | 8640 | public function setPage(TPage $page); |
8641 | + |
|
8642 | + /** |
|
8643 | + * @return void |
|
8644 | + */ |
|
8127 | 8645 | public function save($state); |
8128 | 8646 | public function load(); |
8129 | 8647 | } |
8130 | 8648 | class TPageStateFormatter |
8131 | 8649 | { |
8650 | + /** |
|
8651 | + * @param TPage $page |
|
8652 | + */ |
|
8132 | 8653 | public static function serialize($page,$data) |
8133 | 8654 | { |
8134 | 8655 | $sm=$page->getApplication()->getSecurityManager(); |
@@ -8142,6 +8663,10 @@ discard block |
||
8142 | 8663 | $str=$sm->encrypt($str); |
8143 | 8664 | return base64_encode($str); |
8144 | 8665 | } |
8666 | + |
|
8667 | + /** |
|
8668 | + * @param TPage $page |
|
8669 | + */ |
|
8145 | 8670 | public static function unserialize($page,$data) |
8146 | 8671 | { |
8147 | 8672 | $str=base64_decode($data); |
@@ -8335,6 +8860,10 @@ discard block |
||
8335 | 8860 | { |
8336 | 8861 | $this->_cacheModuleID=$value; |
8337 | 8862 | } |
8863 | + |
|
8864 | + /** |
|
8865 | + * @param string $value |
|
8866 | + */ |
|
8338 | 8867 | public function setCacheKeyPrefix($value) |
8339 | 8868 | { |
8340 | 8869 | $this->_keyPrefix=$value; |
@@ -8385,10 +8914,18 @@ discard block |
||
8385 | 8914 | { |
8386 | 8915 | $this->_cachePostBack=TPropertyValue::ensureBoolean($value); |
8387 | 8916 | } |
8917 | + |
|
8918 | + /** |
|
8919 | + * @param TOutputCacheCheckDependencyEventParameter $param |
|
8920 | + */ |
|
8388 | 8921 | public function onCheckDependency($param) |
8389 | 8922 | { |
8390 | 8923 | $this->raiseEvent('OnCheckDependency',$this,$param); |
8391 | 8924 | } |
8925 | + |
|
8926 | + /** |
|
8927 | + * @param TOutputCacheCalculateKeyEventParameter $param |
|
8928 | + */ |
|
8392 | 8929 | public function onCalculateKey($param) |
8393 | 8930 | { |
8394 | 8931 | $this->raiseEvent('OnCalculateKey',$this,$param); |
@@ -8480,6 +9017,10 @@ discard block |
||
8480 | 9017 | $tplFile=dirname($class->getFileName()).DIRECTORY_SEPARATOR.$className.self::TEMPLATE_FILE_EXT; |
8481 | 9018 | return $this->getTemplateByFileName($tplFile); |
8482 | 9019 | } |
9020 | + |
|
9021 | + /** |
|
9022 | + * @param string $fileName |
|
9023 | + */ |
|
8483 | 9024 | public function getTemplateByFileName($fileName) |
8484 | 9025 | { |
8485 | 9026 | if(($fileName=$this->getLocalizedTemplate($fileName))!==null) |
@@ -8519,6 +9060,10 @@ discard block |
||
8519 | 9060 | else |
8520 | 9061 | return null; |
8521 | 9062 | } |
9063 | + |
|
9064 | + /** |
|
9065 | + * @return string |
|
9066 | + */ |
|
8522 | 9067 | protected function getLocalizedTemplate($filename) |
8523 | 9068 | { |
8524 | 9069 | if(($app=$this->getApplication()->getGlobalization(false))===null) |
@@ -8684,12 +9229,20 @@ discard block |
||
8684 | 9229 | $parentControl->addParsedObject($control); |
8685 | 9230 | } |
8686 | 9231 | } |
9232 | + |
|
9233 | + /** |
|
9234 | + * @param TControl $control |
|
9235 | + */ |
|
8687 | 9236 | protected function configureControl($control,$name,$value) |
8688 | 9237 | { |
8689 | 9238 | if(strncasecmp($name,'on',2)===0) $this->configureEvent($control,$name,$value,$control); |
8690 | 9239 | else if(($pos=strrpos($name,'.'))===false) $this->configureProperty($control,$name,$value); |
8691 | 9240 | else $this->configureSubProperty($control,$name,$value); |
8692 | 9241 | } |
9242 | + |
|
9243 | + /** |
|
9244 | + * @param TComponent $component |
|
9245 | + */ |
|
8693 | 9246 | protected function configureComponent($component,$name,$value) |
8694 | 9247 | { |
8695 | 9248 | if(strpos($name,'.')===false) $this->configureProperty($component,$name,$value); |
@@ -8999,6 +9552,11 @@ discard block |
||
8999 | 9552 | $tpl=$objects; |
9000 | 9553 | return $objects; |
9001 | 9554 | } |
9555 | + |
|
9556 | + /** |
|
9557 | + * @param string $str |
|
9558 | + * @param string $offset |
|
9559 | + */ |
|
9002 | 9560 | protected function parseAttributes($str,$offset) |
9003 | 9561 | { |
9004 | 9562 | if($str==='') |
@@ -9030,11 +9588,19 @@ discard block |
||
9030 | 9588 | } |
9031 | 9589 | return $attributes; |
9032 | 9590 | } |
9591 | + |
|
9592 | + /** |
|
9593 | + * @param string $content |
|
9594 | + */ |
|
9033 | 9595 | protected function parseTemplateProperty($content,$offset) |
9034 | 9596 | { |
9035 | 9597 | $line=$this->_startingLine+count(explode("\n",substr($this->_content,0,$offset)))-1; |
9036 | 9598 | return array(self::CONFIG_TEMPLATE,new TTemplate($content,$this->_contextPath,$this->_tplFile,$line,false)); |
9037 | 9599 | } |
9600 | + |
|
9601 | + /** |
|
9602 | + * @param string $value |
|
9603 | + */ |
|
9038 | 9604 | protected function parseAttribute($value) |
9039 | 9605 | { |
9040 | 9606 | if(($n=preg_match_all('/<%[#=].*?%>/msS',$value,$matches,PREG_OFFSET_CAPTURE))>0) |
@@ -9157,6 +9723,11 @@ discard block |
||
9157 | 9723 | { |
9158 | 9724 | return $this->_includedFiles; |
9159 | 9725 | } |
9726 | + |
|
9727 | + /** |
|
9728 | + * @param Exception $e |
|
9729 | + * @param integer $line |
|
9730 | + */ |
|
9160 | 9731 | protected function handleException($e,$line,$input=null) |
9161 | 9732 | { |
9162 | 9733 | $srcFile=$this->_tplFile; |
@@ -9213,6 +9784,10 @@ discard block |
||
9213 | 9784 | } |
9214 | 9785 | return $input; |
9215 | 9786 | } |
9787 | + |
|
9788 | + /** |
|
9789 | + * @param string $method |
|
9790 | + */ |
|
9216 | 9791 | protected function isClassBehaviorMethod(ReflectionClass $class,$method) |
9217 | 9792 | { |
9218 | 9793 | $component=new ReflectionClass('TComponent'); |
@@ -9295,6 +9870,10 @@ discard block |
||
9295 | 9870 | throw new TInvalidDataValueException('thememanager_basepath_invalid',$value); |
9296 | 9871 | } |
9297 | 9872 | } |
9873 | + |
|
9874 | + /** |
|
9875 | + * @return string |
|
9876 | + */ |
|
9298 | 9877 | public function getBaseUrl() |
9299 | 9878 | { |
9300 | 9879 | if($this->_baseUrl===null) |
@@ -9693,6 +10272,10 @@ discard block |
||
9693 | 10272 | { |
9694 | 10273 | return $this->_defaultPage; |
9695 | 10274 | } |
10275 | + |
|
10276 | + /** |
|
10277 | + * @param string $value |
|
10278 | + */ |
|
9696 | 10279 | public function setDefaultPage($value) |
9697 | 10280 | { |
9698 | 10281 | if($this->_initialized) |
@@ -9781,6 +10364,10 @@ discard block |
||
9781 | 10364 | $page->setSubProperty($name,$value); |
9782 | 10365 | $page->run($this->getResponse()->createHtmlWriter()); |
9783 | 10366 | } |
10367 | + |
|
10368 | + /** |
|
10369 | + * @param string $pagePath |
|
10370 | + */ |
|
9784 | 10371 | public function constructUrl($pagePath,$getParams=null,$encodeAmpersand=true,$encodeGetItems=true) |
9785 | 10372 | { |
9786 | 10373 | return $this->getRequest()->constructUrl($this->getID(),$pagePath,$getParams,$encodeAmpersand,$encodeGetItems); |
@@ -9852,11 +10439,20 @@ discard block |
||
9852 | 10439 | throw new TConfigurationException('pageserviceconf_file_invalid',$fname); |
9853 | 10440 | } |
9854 | 10441 | } |
10442 | + |
|
10443 | + /** |
|
10444 | + * @param string $configPath |
|
10445 | + */ |
|
9855 | 10446 | public function loadFromPhp($config,$configPath,$configPagePath) |
9856 | 10447 | { |
9857 | 10448 | $this->loadApplicationConfigurationFromPhp($config,$configPath); |
9858 | 10449 | $this->loadPageConfigurationFromPhp($config,$configPath,$configPagePath); |
9859 | 10450 | } |
10451 | + |
|
10452 | + /** |
|
10453 | + * @param TXmlDocument $dom |
|
10454 | + * @param string $configPath |
|
10455 | + */ |
|
9860 | 10456 | public function loadFromXml($dom,$configPath,$configPagePath) |
9861 | 10457 | { |
9862 | 10458 | $this->loadApplicationConfigurationFromXml($dom,$configPath); |
@@ -10113,6 +10709,10 @@ discard block |
||
10113 | 10709 | else |
10114 | 10710 | return $this->_basePath.DIRECTORY_SEPARATOR.$this->hash($path); |
10115 | 10711 | } |
10712 | + |
|
10713 | + /** |
|
10714 | + * @param string $path |
|
10715 | + */ |
|
10116 | 10716 | public function getPublishedUrl($path) |
10117 | 10717 | { |
10118 | 10718 | $path=realpath($path); |
@@ -10121,10 +10721,19 @@ discard block |
||
10121 | 10721 | else |
10122 | 10722 | return $this->_baseUrl.'/'.$this->hash($path); |
10123 | 10723 | } |
10724 | + |
|
10725 | + /** |
|
10726 | + * @param string $dir |
|
10727 | + */ |
|
10124 | 10728 | protected function hash($dir) |
10125 | 10729 | { |
10126 | 10730 | return sprintf('%x',crc32($dir.Prado::getVersion())); |
10127 | 10731 | } |
10732 | + |
|
10733 | + /** |
|
10734 | + * @param string $src |
|
10735 | + * @param string $dst |
|
10736 | + */ |
|
10128 | 10737 | protected function copyFile($src,$dst) |
10129 | 10738 | { |
10130 | 10739 | if(!is_dir($dst)) |
@@ -10138,6 +10747,11 @@ discard block |
||
10138 | 10747 | @copy($src,$dstFile); |
10139 | 10748 | } |
10140 | 10749 | } |
10750 | + |
|
10751 | + /** |
|
10752 | + * @param string $src |
|
10753 | + * @param string $dst |
|
10754 | + */ |
|
10141 | 10755 | public function copyDirectory($src,$dst) |
10142 | 10756 | { |
10143 | 10757 | if(!is_dir($dst)) |
@@ -10167,6 +10781,11 @@ discard block |
||
10167 | 10781 | throw new TInvalidDataValueException('assetmanager_source_directory_invalid', $src); |
10168 | 10782 | } |
10169 | 10783 | } |
10784 | + |
|
10785 | + /** |
|
10786 | + * @param string $tarfile |
|
10787 | + * @param string $md5sum |
|
10788 | + */ |
|
10170 | 10789 | public function publishTarFile($tarfile, $md5sum, $checkTimestamp=false) |
10171 | 10790 | { |
10172 | 10791 | if(isset($this->_published[$md5sum])) |
@@ -10189,6 +10808,10 @@ discard block |
||
10189 | 10808 | return $this->_published[$md5sum]=$this->_baseUrl.'/'.$dir; |
10190 | 10809 | } |
10191 | 10810 | } |
10811 | + |
|
10812 | + /** |
|
10813 | + * @param string $destination |
|
10814 | + */ |
|
10192 | 10815 | protected function deployTarFile($path,$destination) |
10193 | 10816 | { |
10194 | 10817 | if(($fullpath=realpath($path))===false || !is_file($fullpath)) |
@@ -10414,6 +11037,10 @@ discard block |
||
10414 | 11037 | $this->_services=array($this->getPageServiceID()=>array('TPageService',array(),null)); |
10415 | 11038 | Prado::setPathOfAlias('Application',$this->_basePath); |
10416 | 11039 | } |
11040 | + |
|
11041 | + /** |
|
11042 | + * @param string $basePath |
|
11043 | + */ |
|
10417 | 11044 | protected function resolvePaths($basePath) |
10418 | 11045 | { |
10419 | 11046 | if(empty($basePath) || ($basePath=realpath($basePath))===false) |
@@ -10479,10 +11106,18 @@ discard block |
||
10479 | 11106 | { |
10480 | 11107 | return $this->_requestCompleted; |
10481 | 11108 | } |
11109 | + |
|
11110 | + /** |
|
11111 | + * @param integer $defaultValue |
|
11112 | + */ |
|
10482 | 11113 | public function getGlobalState($key,$defaultValue=null) |
10483 | 11114 | { |
10484 | 11115 | return isset($this->_globals[$key])?$this->_globals[$key]:$defaultValue; |
10485 | 11116 | } |
11117 | + |
|
11118 | + /** |
|
11119 | + * @param string $key |
|
11120 | + */ |
|
10486 | 11121 | public function setGlobalState($key,$value,$defaultValue=null,$forceSave=false) |
10487 | 11122 | { |
10488 | 11123 | $this->_stateChanged=true; |
@@ -10542,6 +11177,10 @@ discard block |
||
10542 | 11177 | { |
10543 | 11178 | return $this->_basePath; |
10544 | 11179 | } |
11180 | + |
|
11181 | + /** |
|
11182 | + * @param string $value |
|
11183 | + */ |
|
10545 | 11184 | public function setBasePath($value) |
10546 | 11185 | { |
10547 | 11186 | $this->_basePath=$value; |
@@ -10550,6 +11189,10 @@ discard block |
||
10550 | 11189 | { |
10551 | 11190 | return $this->_configFile; |
10552 | 11191 | } |
11192 | + |
|
11193 | + /** |
|
11194 | + * @param string $value |
|
11195 | + */ |
|
10553 | 11196 | public function setConfigurationFile($value) |
10554 | 11197 | { |
10555 | 11198 | $this->_configFile=$value; |
@@ -10558,6 +11201,10 @@ discard block |
||
10558 | 11201 | { |
10559 | 11202 | return $this->_configType; |
10560 | 11203 | } |
11204 | + |
|
11205 | + /** |
|
11206 | + * @param string $value |
|
11207 | + */ |
|
10561 | 11208 | public function setConfigurationType($value) |
10562 | 11209 | { |
10563 | 11210 | $this->_configType = $value; |
@@ -10597,6 +11244,10 @@ discard block |
||
10597 | 11244 | { |
10598 | 11245 | return $this->_runtimePath; |
10599 | 11246 | } |
11247 | + |
|
11248 | + /** |
|
11249 | + * @param string $value |
|
11250 | + */ |
|
10600 | 11251 | public function setRuntimePath($value) |
10601 | 11252 | { |
10602 | 11253 | $this->_runtimePath=$value; |
@@ -10608,6 +11259,10 @@ discard block |
||
10608 | 11259 | { |
10609 | 11260 | return $this->_service; |
10610 | 11261 | } |
11262 | + |
|
11263 | + /** |
|
11264 | + * @param IService $value |
|
11265 | + */ |
|
10611 | 11266 | public function setService($value) |
10612 | 11267 | { |
10613 | 11268 | $this->_service=$value; |
@@ -10888,6 +11543,10 @@ discard block |
||
10888 | 11543 | else |
10889 | 11544 | throw new THttpException(500,'application_service_unknown',$serviceID); |
10890 | 11545 | } |
11546 | + |
|
11547 | + /** |
|
11548 | + * @param Exception $param |
|
11549 | + */ |
|
10891 | 11550 | public function onError($param) |
10892 | 11551 | { |
10893 | 11552 | Prado::log($param->getMessage(),TLogger::ERROR,'System.TApplication'); |
@@ -232,6 +232,7 @@ discard block |
||
232 | 232 | |
233 | 233 | /** |
234 | 234 | * @param string|boolean output charset. |
235 | + * @param string $charset |
|
235 | 236 | */ |
236 | 237 | public function setCharset($charset) |
237 | 238 | { |
@@ -604,6 +605,7 @@ discard block |
||
604 | 605 | * Sends a header. |
605 | 606 | * @param string header |
606 | 607 | * @param boolean whether the header should replace a previous similar header, or add a second header of the same type |
608 | + * @param string $value |
|
607 | 609 | */ |
608 | 610 | public function appendHeader($value, $replace=true) |
609 | 611 | { |
@@ -629,6 +631,7 @@ discard block |
||
629 | 631 | * Sends a cookie. |
630 | 632 | * Do not call this method directly. Operate with the result of {@link getCookies} instead. |
631 | 633 | * @param THttpCookie cook to be sent |
634 | + * @param THttpCookie $cookie |
|
632 | 635 | */ |
633 | 636 | public function addCookie($cookie) |
634 | 637 | { |
@@ -713,6 +716,7 @@ discard block |
||
713 | 716 | * This method is used internally. Please use {@link createHtmlWriter} instead. |
714 | 717 | * @param string type of HTML writer to be created. |
715 | 718 | * @param ITextWriter text writer holding the contents. |
719 | + * @param THttpResponse $writer |
|
716 | 720 | */ |
717 | 721 | public function createNewHtmlWriter($type, $writer) |
718 | 722 | { |