@@ -37,6 +37,7 @@ discard block |
||
37 | 37 | /** |
38 | 38 | * Returns a user instance according to auth data stored in a cookie. |
39 | 39 | * @param THttpCookie the cookie storing user authentication information |
40 | + * @param \Prado\Web\THttpCookie $cookie |
|
40 | 41 | * @return TUser the user instance generated based on the cookie auth data, null if the cookie does not have valid auth data. |
41 | 42 | * @since 3.1.1 |
42 | 43 | */ |
@@ -44,7 +45,9 @@ discard block |
||
44 | 45 | /** |
45 | 46 | * Saves user auth data into a cookie. |
46 | 47 | * @param THttpCookie the cookie to receive the user auth data. |
48 | + * @param \Prado\Web\THttpCookie $cookie |
|
47 | 49 | * @since 3.1.1 |
50 | + * @return void |
|
48 | 51 | */ |
49 | 52 | public function saveUserToCookie($cookie); |
50 | 53 | /** |
@@ -228,6 +228,7 @@ discard block |
||
228 | 228 | /** |
229 | 229 | * Sets the URL that the browser should be redirected to when login succeeds. |
230 | 230 | * @param string the URL to be redirected to. |
231 | + * @param string $value |
|
231 | 232 | */ |
232 | 233 | public function setReturnUrl($value) |
233 | 234 | { |
@@ -376,6 +377,7 @@ discard block |
||
376 | 377 | /** |
377 | 378 | * Updates the user data stored in session. |
378 | 379 | * @param IUser user object |
380 | + * @param TUser $user |
|
379 | 381 | * @throws new TConfigurationException if session module is not loaded. |
380 | 382 | */ |
381 | 383 | public function updateSessionUser($user) |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |
168 | - * @return array list of IP rules. |
|
168 | + * @return string list of IP rules. |
|
169 | 169 | * @since 3.1.1 |
170 | 170 | */ |
171 | 171 | public function getIPRules() |
@@ -223,11 +223,17 @@ discard block |
||
223 | 223 | return 0; |
224 | 224 | } |
225 | 225 | |
226 | + /** |
|
227 | + * @param IUser $user |
|
228 | + */ |
|
226 | 229 | private function isUserMatched($user) |
227 | 230 | { |
228 | 231 | return ($this->_everyone || ($this->_guest && $user->getIsGuest()) || ($this->_authenticated && !$user->getIsGuest()) || in_array(strtolower($user->getName()),$this->_users)); |
229 | 232 | } |
230 | 233 | |
234 | + /** |
|
235 | + * @param IUser $user |
|
236 | + */ |
|
231 | 237 | private function isRoleMatched($user) |
232 | 238 | { |
233 | 239 | foreach($this->_roles as $role) |
@@ -162,7 +162,8 @@ |
||
162 | 162 | /** |
163 | 163 | * Creates the DB connection. |
164 | 164 | * @param string the module ID for TDataSourceConfig |
165 | - * @return TDbConnection the created DB connection |
|
165 | + * @param string $connectionID |
|
166 | + * @return \Prado\Data\TDbConnection the created DB connection |
|
166 | 167 | * @throws TConfigurationException if module ID is invalid or empty |
167 | 168 | */ |
168 | 169 | protected function createDbConnection($connectionID) |
@@ -325,6 +325,7 @@ discard block |
||
325 | 325 | * to determine the application configuration file, |
326 | 326 | * application root path and the runtime path. |
327 | 327 | * @param string the application root path or the application configuration file |
328 | + * @param string $basePath |
|
328 | 329 | * @see setBasePath |
329 | 330 | * @see setRuntimePath |
330 | 331 | * @see setConfigurationFile |
@@ -423,6 +424,7 @@ discard block |
||
423 | 424 | * A global value is one that is persistent across users sessions and requests. |
424 | 425 | * @param string the name of the value to be returned |
425 | 426 | * @param mixed the default value. If $key is not found, $defaultValue will be returned |
427 | + * @param integer $defaultValue |
|
426 | 428 | * @return mixed the global value corresponding to $key |
427 | 429 | */ |
428 | 430 | public function getGlobalState($key,$defaultValue=null) |
@@ -439,6 +441,7 @@ discard block |
||
439 | 441 | * @param mixed the global value to be set |
440 | 442 | * @param mixed the default value. If $key is not found, $defaultValue will be returned |
441 | 443 | * @param boolean wheter to force an immediate GlobalState save. defaults to false |
444 | + * @param string $key |
|
442 | 445 | */ |
443 | 446 | public function setGlobalState($key,$value,$defaultValue=null,$forceSave=false) |
444 | 447 | { |
@@ -553,6 +556,7 @@ discard block |
||
553 | 556 | |
554 | 557 | /** |
555 | 558 | * @param string the directory containing the application configuration file |
559 | + * @param string $value |
|
556 | 560 | */ |
557 | 561 | public function setBasePath($value) |
558 | 562 | { |
@@ -569,6 +573,7 @@ discard block |
||
569 | 573 | |
570 | 574 | /** |
571 | 575 | * @param string the application configuration file (absolute path) |
576 | + * @param string $value |
|
572 | 577 | */ |
573 | 578 | public function setConfigurationFile($value) |
574 | 579 | { |
@@ -585,6 +590,7 @@ discard block |
||
585 | 590 | |
586 | 591 | /** |
587 | 592 | * @param string the application configuration type. 'xml' and 'php' are valid values |
593 | + * @param string $value |
|
588 | 594 | */ |
589 | 595 | public function setConfigurationType($value) |
590 | 596 | { |
@@ -640,6 +646,7 @@ discard block |
||
640 | 646 | |
641 | 647 | /** |
642 | 648 | * @param string the directory storing cache data and application-level persistent data. (absolute path) |
649 | + * @param string $value |
|
643 | 650 | */ |
644 | 651 | public function setRuntimePath($value) |
645 | 652 | { |
@@ -1071,6 +1078,7 @@ discard block |
||
1071 | 1078 | * The service instance will be created. Its properties will be initialized |
1072 | 1079 | * and the configurations will be applied, if any. |
1073 | 1080 | * @param string service ID |
1081 | + * @param string $serviceID |
|
1074 | 1082 | */ |
1075 | 1083 | public function startService($serviceID) |
1076 | 1084 | { |
@@ -1109,6 +1117,7 @@ discard block |
||
1109 | 1117 | * This method is invoked when an exception is raised during the lifecycles |
1110 | 1118 | * of the application. |
1111 | 1119 | * @param mixed event parameter |
1120 | + * @param \Exception $param |
|
1112 | 1121 | */ |
1113 | 1122 | public function onError($param) |
1114 | 1123 | { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
54 | - * @return THttpRequest the current user request |
|
54 | + * @return Web\THttpRequest the current user request |
|
55 | 55 | */ |
56 | 56 | public function getRequest() |
57 | 57 | { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
62 | - * @return THttpResponse the response |
|
62 | + * @return Web\THttpResponse the response |
|
63 | 63 | */ |
64 | 64 | public function getResponse() |
65 | 65 | { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
70 | - * @return THttpSession user session |
|
70 | + * @return Web\THttpSession user session |
|
71 | 71 | */ |
72 | 72 | public function getSession() |
73 | 73 | { |
@@ -94,6 +94,7 @@ discard block |
||
94 | 94 | * |
95 | 95 | * @param string path of the asset that is relative to the directory containing the specified class file. |
96 | 96 | * @param string name of the class whose containing directory will be prepend to the asset path. If null, it means get_class($this). |
97 | + * @param string $assetPath |
|
97 | 98 | * @return string URL to the asset path. |
98 | 99 | */ |
99 | 100 | public function publishAsset($assetPath,$className=null) |
@@ -108,6 +109,7 @@ discard block |
||
108 | 109 | /** |
109 | 110 | * Publishes a file or directory and returns its URL. |
110 | 111 | * @param string absolute path of the file or directory to be published |
112 | + * @param string $fullPath |
|
111 | 113 | * @return string URL to the published file or directory |
112 | 114 | */ |
113 | 115 | public function publishFilePath($fullPath, $checkTimestamp=false) |
@@ -61,6 +61,7 @@ |
||
61 | 61 | /** |
62 | 62 | * Parses the application configuration file. |
63 | 63 | * @param string configuration file name |
64 | + * @param string $fname |
|
64 | 65 | * @throws TConfigurationException if there is any parsing error |
65 | 66 | */ |
66 | 67 | public function loadFromFile($fname) |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | * </code> |
423 | 423 | * to be executed when listen is called. All attached behaviors are notified through dyListen. |
424 | 424 | * |
425 | - * @return numeric the number of global events that were registered to the global event registry |
|
425 | + * @return null|integer the number of global events that were registered to the global event registry |
|
426 | 426 | */ |
427 | 427 | public function listen() { |
428 | 428 | if($this->_listeningenabled) |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | * </code> |
457 | 457 | * to be executed when listen is called. All attached behaviors are notified through dyUnlisten. |
458 | 458 | * |
459 | - * @return numeric the number of global events that were unregistered from the global event registry |
|
459 | + * @return null|integer the number of global events that were unregistered from the global event registry |
|
460 | 460 | */ |
461 | 461 | public function unlisten() { |
462 | 462 | if(!$this->_listeningenabled) |
@@ -793,6 +793,7 @@ discard block |
||
793 | 793 | * A property is defined if there is a getter or setter method |
794 | 794 | * defined in the class. Note, property names are case-insensitive. |
795 | 795 | * @param string the property name |
796 | + * @param string $name |
|
796 | 797 | * @return boolean whether the property is defined |
797 | 798 | */ |
798 | 799 | public function hasProperty($name) |
@@ -55,6 +55,9 @@ discard block |
||
55 | 55 | $this->reflect(); |
56 | 56 | } |
57 | 57 | |
58 | + /** |
|
59 | + * @param \ReflectionMethod $method |
|
60 | + */ |
|
58 | 61 | private function isPropertyMethod($method) |
59 | 62 | { |
60 | 63 | $methodName=$method->getName(); |
@@ -63,6 +66,9 @@ discard block |
||
63 | 66 | && isset($methodName[3]); |
64 | 67 | } |
65 | 68 | |
69 | + /** |
|
70 | + * @param \ReflectionMethod $method |
|
71 | + */ |
|
66 | 72 | private function isEventMethod($method) |
67 | 73 | { |
68 | 74 | $methodName=$method->getName(); |