@@ -201,7 +201,7 @@ |
||
| 201 | 201 | * module of the Prado application to handle the exception. |
| 202 | 202 | * If the application or the module does not exist, it simply echoes the |
| 203 | 203 | * exception. |
| 204 | - * @param Exception $exception exception that is not caught |
|
| 204 | + * @param TPhpFatalErrorException $exception exception that is not caught |
|
| 205 | 205 | */ |
| 206 | 206 | public static function exceptionHandler($exception) |
| 207 | 207 | { |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /** |
| 172 | - * @return array list of IP rules. |
|
| 172 | + * @return string list of IP rules. |
|
| 173 | 173 | * @since 3.1.1 |
| 174 | 174 | */ |
| 175 | 175 | public function getIPRules() |
@@ -216,6 +216,9 @@ discard block |
||
| 216 | 216 | } |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | + /** |
|
| 220 | + * @param string $ip |
|
| 221 | + */ |
|
| 219 | 222 | private function isIpMatched($ip) |
| 220 | 223 | { |
| 221 | 224 | if (empty($this->_ipRules)) { |
@@ -229,11 +232,17 @@ discard block |
||
| 229 | 232 | return 0; |
| 230 | 233 | } |
| 231 | 234 | |
| 235 | + /** |
|
| 236 | + * @param IUser $user |
|
| 237 | + */ |
|
| 232 | 238 | private function isUserMatched($user) |
| 233 | 239 | { |
| 234 | 240 | return ($this->_everyone || ($this->_guest && $user->getIsGuest()) || ($this->_authenticated && !$user->getIsGuest()) || in_array(strtolower($user->getName()), $this->_users)); |
| 235 | 241 | } |
| 236 | 242 | |
| 243 | + /** |
|
| 244 | + * @param IUser $user |
|
| 245 | + */ |
|
| 237 | 246 | private function isRoleMatched($user) |
| 238 | 247 | { |
| 239 | 248 | foreach ($this->_roles as $role) { |
@@ -244,6 +253,9 @@ discard block |
||
| 244 | 253 | return false; |
| 245 | 254 | } |
| 246 | 255 | |
| 256 | + /** |
|
| 257 | + * @param string $verb |
|
| 258 | + */ |
|
| 247 | 259 | private function isVerbMatched($verb) |
| 248 | 260 | { |
| 249 | 261 | return ($this->_verb === '*' || strcasecmp($verb, $this->_verb) === 0); |
@@ -164,7 +164,7 @@ |
||
| 164 | 164 | * Creates the DB connection. |
| 165 | 165 | * @param string $connectionID the module ID for TDataSourceConfig |
| 166 | 166 | * @throws TConfigurationException if module ID is invalid or empty |
| 167 | - * @return TDbConnection the created DB connection |
|
| 167 | + * @return \Prado\Data\TDbConnection the created DB connection |
|
| 168 | 168 | */ |
| 169 | 169 | protected function createDbConnection($connectionID) |
| 170 | 170 | { |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | * |
| 412 | 412 | * A global value is one that is persistent across users sessions and requests. |
| 413 | 413 | * @param string $key the name of the value to be returned |
| 414 | - * @param mixed $defaultValue the default value. If $key is not found, $defaultValue will be returned |
|
| 414 | + * @param integer $defaultValue the default value. If $key is not found, $defaultValue will be returned |
|
| 415 | 415 | * @return mixed the global value corresponding to $key |
| 416 | 416 | */ |
| 417 | 417 | public function getGlobalState($key, $defaultValue = null) |
@@ -669,7 +669,7 @@ discard block |
||
| 669 | 669 | } |
| 670 | 670 | |
| 671 | 671 | /** |
| 672 | - * @param mixed $id |
|
| 672 | + * @param string $id |
|
| 673 | 673 | * @return IModule the module with the specified ID, null if not found |
| 674 | 674 | */ |
| 675 | 675 | public function getModule($id) |
@@ -741,7 +741,7 @@ discard block |
||
| 741 | 741 | } |
| 742 | 742 | |
| 743 | 743 | /** |
| 744 | - * @param THttpRequest $response the request module |
|
| 744 | + * @param THttpResponse $response the request module |
|
| 745 | 745 | */ |
| 746 | 746 | public function setResponse(THttpResponse $response) |
| 747 | 747 | { |
@@ -1096,7 +1096,7 @@ discard block |
||
| 1096 | 1096 | * Raises OnError event. |
| 1097 | 1097 | * This method is invoked when an exception is raised during the lifecycles |
| 1098 | 1098 | * of the application. |
| 1099 | - * @param mixed $param event parameter |
|
| 1099 | + * @param \Exception $param event parameter |
|
| 1100 | 1100 | */ |
| 1101 | 1101 | public function onError($param) |
| 1102 | 1102 | { |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | * </code> |
| 436 | 436 | * to be executed when listen is called. All attached behaviors are notified through dyListen. |
| 437 | 437 | * |
| 438 | - * @return numeric the number of global events that were registered to the global event registry |
|
| 438 | + * @return null|integer the number of global events that were registered to the global event registry |
|
| 439 | 439 | */ |
| 440 | 440 | public function listen() |
| 441 | 441 | { |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | * </code> |
| 473 | 473 | * to be executed when listen is called. All attached behaviors are notified through dyUnlisten. |
| 474 | 474 | * |
| 475 | - * @return numeric the number of global events that were unregistered from the global event registry |
|
| 475 | + * @return null|integer the number of global events that were unregistered from the global event registry |
|
| 476 | 476 | */ |
| 477 | 477 | public function unlisten() |
| 478 | 478 | { |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | /** |
| 184 | 184 | * Gets the time stamp from string or integer. |
| 185 | 185 | * @param int|string $value date to parse |
| 186 | - * @return array date info array |
|
| 186 | + * @return \DateTime date info array |
|
| 187 | 187 | */ |
| 188 | 188 | private function getDate($value) |
| 189 | 189 | { |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | /** |
| 200 | - * @param mixed $value |
|
| 200 | + * @param string $value |
|
| 201 | 201 | * @return bool true if the given value matches with the date pattern. |
| 202 | 202 | */ |
| 203 | 203 | public function isValidDate($value) |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | |
| 352 | 352 | /** |
| 353 | 353 | * Calculate the length of a string, may be consider iconv_strlen? |
| 354 | - * @param mixed $string |
|
| 354 | + * @param string $string |
|
| 355 | 355 | */ |
| 356 | 356 | private function length($string) |
| 357 | 357 | { |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | * Gets a portion of a string, uses iconv_substr. |
| 374 | 374 | * @param mixed $string |
| 375 | 375 | * @param mixed $start |
| 376 | - * @param mixed $length |
|
| 376 | + * @param integer $length |
|
| 377 | 377 | */ |
| 378 | 378 | private function substring($string, $start, $length) |
| 379 | 379 | { |
@@ -382,9 +382,9 @@ discard block |
||
| 382 | 382 | |
| 383 | 383 | /** |
| 384 | 384 | * Returns true if char at position equals a particular char. |
| 385 | - * @param mixed $string |
|
| 386 | - * @param mixed $pos |
|
| 387 | - * @param mixed $char |
|
| 385 | + * @param string $string |
|
| 386 | + * @param integer $pos |
|
| 387 | + * @param string $char |
|
| 388 | 388 | */ |
| 389 | 389 | private function charEqual($string, $pos, $char) |
| 390 | 390 | { |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | /** |
| 104 | 104 | * @param mixed $js |
| 105 | - * @return Marks a string as a javascript function. Once marke, the string is considered as a |
|
| 105 | + * @return TJavaScriptLiteral a string as a javascript function. Once marke, the string is considered as a |
|
| 106 | 106 | * raw javascript function that is not supposed to be encoded by {@link encode} |
| 107 | 107 | */ |
| 108 | 108 | public static function quoteJsLiteral($js) |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | * Encodes a PHP variable into javascript string. |
| 210 | 210 | * This method invokes json_encode to perform the encoding. |
| 211 | 211 | * @param mixed $value variable to be encoded |
| 212 | - * @param mixed $options |
|
| 212 | + * @param integer $options |
|
| 213 | 213 | * @return string encoded string |
| 214 | 214 | */ |
| 215 | 215 | public static function jsonEncode($value, $options = 0) |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | * Minimize the size of a javascript script. |
| 288 | 288 | * This method is based on Douglas Crockford's JSMin. |
| 289 | 289 | * @param string $code code that you want to minimzie |
| 290 | - * @return minimized version of the code |
|
| 290 | + * @return string version of the code |
|
| 291 | 291 | */ |
| 292 | 292 | public static function JSMin($code) |
| 293 | 293 | { |
@@ -152,6 +152,10 @@ |
||
| 152 | 152 | } |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | + /** |
|
| 156 | + * @param string $configPath |
|
| 157 | + * @param string $configPagePath |
|
| 158 | + */ |
|
| 155 | 159 | public function loadFromPhp($config, $configPath, $configPagePath) |
| 156 | 160 | { |
| 157 | 161 | $this->loadApplicationConfigurationFromPhp($config, $configPath); |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | /** |
| 100 | 100 | * Generate a SOAP fault message. |
| 101 | 101 | * @param string $title message title |
| 102 | - * @param mixed $details message details |
|
| 102 | + * @param string $details message details |
|
| 103 | 103 | * @param string $code message code, defalt is 'SERVER'. |
| 104 | 104 | * @param string $actor actors |
| 105 | 105 | * @param string $name message name |