@@ -68,6 +68,9 @@ |
||
68 | 68 | $this->_bIsGoogleClosure = (bool) Config::getInstance()->values['cache']['enable.js.closure_compiler_service']; |
69 | 69 | } |
70 | 70 | |
71 | + /** |
|
72 | + * @param string $sPhp |
|
73 | + */ |
|
71 | 74 | public function parsePhp($sPhp) |
72 | 75 | { |
73 | 76 | $sPhp = preg_replace('#/\*.*+\*#', '', $sPhp); # Removing PHP comments |
@@ -120,6 +120,7 @@ discard block |
||
120 | 120 | * Check if file exists. |
121 | 121 | * |
122 | 122 | * @param mixed (array | string) $mFile |
123 | + * @param string $mFile |
|
123 | 124 | * @return boolean TRUE if file exists, FALSE otherwise. |
124 | 125 | */ |
125 | 126 | public function existFile($mFile) |
@@ -273,6 +274,7 @@ discard block |
||
273 | 274 | * |
274 | 275 | * @param mixed (string | array) $mDir |
275 | 276 | * @param integer (octal) $iMode Default: 0777 |
277 | + * @param string $mDir |
|
276 | 278 | * @return void |
277 | 279 | * @throws \PH7\Framework\File\Exception If the file cannot be created. |
278 | 280 | */ |
@@ -321,7 +323,7 @@ discard block |
||
321 | 323 | * |
322 | 324 | * @param string $sFrom File or directory. |
323 | 325 | * @param string $sTo File or directory. |
324 | - * @return mixed (integer | boolean) Returns the last line on success, and FALSE on failure. |
|
326 | + * @return string|false (integer | boolean) Returns the last line on success, and FALSE on failure. |
|
325 | 327 | */ |
326 | 328 | public function systemCopy($sFrom, $sTo) |
327 | 329 | { |
@@ -363,7 +365,7 @@ discard block |
||
363 | 365 | * |
364 | 366 | * @param string $sFrom File or directory. |
365 | 367 | * @param string $sTo File or directory. |
366 | - * @return mixed (integer | boolean) Returns the last line on success, and FALSE on failure. |
|
368 | + * @return string|false (integer | boolean) Returns the last line on success, and FALSE on failure. |
|
367 | 369 | */ |
368 | 370 | public function systemRename($sFrom, $sTo) |
369 | 371 | { |
@@ -417,6 +419,7 @@ discard block |
||
417 | 419 | * Get the creation/modification time of a file in the Unix timestamp. |
418 | 420 | * |
419 | 421 | * @param string Full path of the file. |
422 | + * @param string $sFile |
|
420 | 423 | * @return mixed (integer | boolean) Returns the time the file was last modified, or FALSE if it not found. |
421 | 424 | */ |
422 | 425 | public function getModifTime($sFile) |
@@ -430,6 +433,7 @@ discard block |
||
430 | 433 | * |
431 | 434 | * @static |
432 | 435 | * @param string Full path of the file. |
436 | + * @param string $sFile |
|
433 | 437 | * @return integer Returns the latest modification time of the file in Unix timestamp. |
434 | 438 | */ |
435 | 439 | public static function version($sFile) |
@@ -441,7 +445,7 @@ discard block |
||
441 | 445 | * Delay script execution. |
442 | 446 | * |
443 | 447 | * @param integer $iSleep Halt time in seconds. Optional parameter, default value is 5. |
444 | - * @return mixed (integer | boolean) Returns "0" on success, or "false" on error. |
|
448 | + * @return integer (integer | boolean) Returns "0" on success, or "false" on error. |
|
445 | 449 | */ |
446 | 450 | public function sleep($iSleep = null) |
447 | 451 | { |
@@ -681,7 +685,7 @@ discard block |
||
681 | 685 | * Get the URL contents (For URLs, it is better to use CURL because it is faster than file_get_contents function). |
682 | 686 | * |
683 | 687 | * @param string $sUrl URL to be read contents. |
684 | - * @return mixed (string | boolean) Return the result content on success, FALSE on failure. |
|
688 | + * @return string (string | boolean) Return the result content on success, FALSE on failure. |
|
685 | 689 | */ |
686 | 690 | public function getUrlContents($sUrl) |
687 | 691 | { |
@@ -754,7 +758,7 @@ discard block |
||
754 | 758 | * Create a recurive directory iterator for a given directory. |
755 | 759 | * |
756 | 760 | * @param string $sPath |
757 | - * @return string The directory. |
|
761 | + * @return \RecursiveDirectoryIterator The directory. |
|
758 | 762 | */ |
759 | 763 | public function getDirIterator($sPath) |
760 | 764 | { |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | } |
218 | 218 | |
219 | 219 | /** |
220 | - * @return mixed |
|
220 | + * @return boolean |
|
221 | 221 | */ |
222 | 222 | public function getEnableGeolocation() |
223 | 223 | { |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | * |
446 | 446 | * @param string $address an address |
447 | 447 | * |
448 | - * @return array array with precision, lat & lng |
|
448 | + * @return string array with precision, lat & lng |
|
449 | 449 | */ |
450 | 450 | public function geocoding($address) |
451 | 451 | { |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | /** |
92 | 92 | * @static |
93 | 93 | * @param integer $iStatus The "code" for the HTTP status |
94 | - * @return mixed (string | boolean) $iStatus Returns the "HTTP status code" if found otherwise returns "false" |
|
94 | + * @return integer (string | boolean) $iStatus Returns the "HTTP status code" if found otherwise returns "false" |
|
95 | 95 | */ |
96 | 96 | public static function getStatusCodes($iStatus) |
97 | 97 | { |
@@ -129,6 +129,7 @@ discard block |
||
129 | 129 | * |
130 | 130 | * @static |
131 | 131 | * @param mixed (string | array) $mHeaders Headers to send. |
132 | + * @param string $mHeaders |
|
132 | 133 | * @throws \PH7\Framework\Http\Exception |
133 | 134 | */ |
134 | 135 | public static function setHeaders($mHeaders) |
@@ -188,7 +189,7 @@ discard block |
||
188 | 189 | * @static |
189 | 190 | * @param string $sUsr |
190 | 191 | * @param string $sPwd |
191 | - * @return boolean TRUE if the authentication is correct, otherwise FALSE. |
|
192 | + * @return null|boolean TRUE if the authentication is correct, otherwise FALSE. |
|
192 | 193 | */ |
193 | 194 | public static function requireAuth($sUsr, $sPwd) |
194 | 195 | { |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | /** |
101 | 101 | * @desc Image Quality. |
102 | 102 | * @param integer $iQ Devault value 100. |
103 | - * @return object $this |
|
103 | + * @return Image $this |
|
104 | 104 | */ |
105 | 105 | public function quality($iQ = 100) |
106 | 106 | { |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | /** |
112 | 112 | * @desc Image Compression. |
113 | 113 | * @param integer $iC Devault value 4. |
114 | - * @return object $this |
|
114 | + * @return Image $this |
|
115 | 115 | */ |
116 | 116 | public function compression($iC = 4) |
117 | 117 | { |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | * @desc Resize |
124 | 124 | * @param integer $iX Default value null |
125 | 125 | * @param integer $iY Default value null |
126 | - * @return object $this |
|
126 | + * @return Image $this |
|
127 | 127 | */ |
128 | 128 | public function resize($iX = null, $iY = null) |
129 | 129 | { |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | * @param integer $iY Default value 0. |
155 | 155 | * @param integer $iWidth Default valie 1. |
156 | 156 | * @param integer $iHeight Default value 1. |
157 | - * @return object $this |
|
157 | + * @return Image $this |
|
158 | 158 | */ |
159 | 159 | public function crop($iX = 0, $iY = 0, $iWidth = 1, $iHeight = 1) |
160 | 160 | { |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | * @desc Dynamic Resize. |
174 | 174 | * @param integer $iNewWidth |
175 | 175 | * @param integer $iNewHeight |
176 | - * @return object $this |
|
176 | + * @return Image $this |
|
177 | 177 | */ |
178 | 178 | public function dynamicResize($iNewWidth, $iNewHeight) |
179 | 179 | { |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | * @desc Square. |
205 | 205 | * @param integer $iSize |
206 | 206 | * @see \PH7\Framework\Image\Image::dynamicResize() The method that is returned by this method. |
207 | - * @return object $this |
|
207 | + * @return Image $this |
|
208 | 208 | */ |
209 | 209 | public function square($iSize) |
210 | 210 | { |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | * @param integer $iHeight |
218 | 218 | * @param string $sZone Default value is center. |
219 | 219 | * @see \PH7\Framework\Image\Image::crop() The method that is returned by this method. |
220 | - * @return object $this |
|
220 | + * @return Image $this |
|
221 | 221 | * @throws \PH7\Framework\Error\CException\PH7InvalidArgumentException If the image crop is invalid. |
222 | 222 | */ |
223 | 223 | public function zoneCrop($iWidth, $iHeight, $sZone = 'center') |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | * @desc Rotate. |
292 | 292 | * @param integer $iDeg Default value 0. |
293 | 293 | * @param integer $iBg Default value 0. |
294 | - * @return object $this |
|
294 | + * @return Image $this |
|
295 | 295 | */ |
296 | 296 | public function rotate($iDeg = 0, $iBg = 0) |
297 | 297 | { |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | * @desc Create a Watermark text. |
305 | 305 | * @param string $sText Text of watermark. |
306 | 306 | * @param integer $iSize The size of text. Between 0 to 5. |
307 | - * @return object $this |
|
307 | + * @return Image $this |
|
308 | 308 | */ |
309 | 309 | public function watermarkText($sText, $iSize) |
310 | 310 | { |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | /** |
343 | 343 | * @desc Save Image. |
344 | 344 | * @param string $sFile |
345 | - * @return object $this |
|
345 | + * @return Image $this |
|
346 | 346 | * @throws \PH7\Framework\Error\CException\PH7InvalidArgumentException If the image format is invalid. |
347 | 347 | */ |
348 | 348 | public function save($sFile) |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | |
375 | 375 | /** |
376 | 376 | * @desc Show Image. |
377 | - * @return object $this |
|
377 | + * @return Image $this |
|
378 | 378 | * @throws \PH7\Framework\Error\CException\PH7InvalidArgumentException If the image format is invalid. |
379 | 379 | */ |
380 | 380 | public function show() |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | |
410 | 410 | /** |
411 | 411 | * @desc Get File Name. |
412 | - * @return string |
|
412 | + * @return resource |
|
413 | 413 | */ |
414 | 414 | public function getFileName() |
415 | 415 | { |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | /** |
420 | 420 | * Determine and get the type of the image (even an unallowed image type) by reading the first bytes and checking its signature. |
421 | 421 | * |
422 | - * @return mixed (string | boolean) When a correct signature is found, returns the appropriate value, FALSE otherwise. |
|
422 | + * @return integer (string | boolean) When a correct signature is found, returns the appropriate value, FALSE otherwise. |
|
423 | 423 | */ |
424 | 424 | public function getType() |
425 | 425 | { |
@@ -283,6 +283,10 @@ discard block |
||
283 | 283 | } |
284 | 284 | |
285 | 285 | /*This method restores the serialized form instance.*/ |
286 | + |
|
287 | + /** |
|
288 | + * @param string $id |
|
289 | + */ |
|
286 | 290 | private static function recover($id) |
287 | 291 | { |
288 | 292 | if(!empty($_SESSION['pfbc'][$id]['form'])) |
@@ -483,6 +487,10 @@ discard block |
||
483 | 487 | |
484 | 488 | /*Valldation errors are saved in the session after the form submission, and will be displayed to the user |
485 | 489 | when redirected back to the form.*/ |
490 | + |
|
491 | + /** |
|
492 | + * @param string $id |
|
493 | + */ |
|
486 | 494 | public static function setError($id, $messages, $element = '') |
487 | 495 | { |
488 | 496 | if (!is_array($messages)) |
@@ -496,11 +504,18 @@ discard block |
||
496 | 504 | } |
497 | 505 | |
498 | 506 | /*setSuccess*/ |
507 | + |
|
508 | + /** |
|
509 | + * @param string $id |
|
510 | + */ |
|
499 | 511 | public static function setSuccess($id, $message, $element = '') |
500 | 512 | { |
501 | 513 | return (new Design)->setFlashMsg($message, Design::SUCCESS_TYPE); |
502 | 514 | } |
503 | 515 | |
516 | + /** |
|
517 | + * @param string $id |
|
518 | + */ |
|
504 | 519 | public static function setSessionValue($id, $element, $value) |
505 | 520 | { |
506 | 521 | $_SESSION['pfbc'][$id]['values'][$element] = $value; |
@@ -253,6 +253,11 @@ discard block |
||
253 | 253 | } |
254 | 254 | } |
255 | 255 | |
256 | + /** |
|
257 | + * @param string $sModule |
|
258 | + * @param string $sController |
|
259 | + * @param string $sAction |
|
260 | + */ |
|
256 | 261 | public function url($sModule, $sController, $sAction, $sVars = null, $bClear = true) |
257 | 262 | { |
258 | 263 | $sUrl = Uri::get($sModule, $sController, $sAction, $sVars, $bClear); |
@@ -514,7 +519,7 @@ discard block |
||
514 | 519 | * @internal If it's an IPv6, show only the beginning, otherwise it would be too long in the template. |
515 | 520 | * @param string $sIp IP address. Default NULL |
516 | 521 | * @param boolean $bPrint Print or Return the HTML code. Default TRUE |
517 | - * @return mixed (string | void) |
|
522 | + * @return null|string (string | void) |
|
518 | 523 | */ |
519 | 524 | public function ip($sIp = null, $bPrint = true) |
520 | 525 | { |
@@ -531,7 +536,7 @@ discard block |
||
531 | 536 | * Show the geolocation of the user (with link that points to the Country controller). |
532 | 537 | * |
533 | 538 | * @param boolean $bPrint Print or Return the HTML code. Default TRUE |
534 | - * @return mixed (string | void) |
|
539 | + * @return null|string (string | void) |
|
535 | 540 | */ |
536 | 541 | public function geoIp($bPrint = true) |
537 | 542 | { |
@@ -563,7 +568,7 @@ discard block |
||
563 | 568 | /** |
564 | 569 | * Get the User Avatar. |
565 | 570 | * |
566 | - * @param string $sUername |
|
571 | + * @param string $sUsername |
|
567 | 572 | * @param string $sSex |
568 | 573 | * @param integer $iSize |
569 | 574 | * @return void Html contents. URL avatar default 150px or the user avatar. |
@@ -12,24 +12,23 @@ |
||
12 | 12 | namespace PH7\Framework\Layout\Html; |
13 | 13 | defined('PH7') or exit('Restricted access'); |
14 | 14 | |
15 | -use |
|
16 | -PH7\Framework\Core\Kernel, |
|
17 | -PH7\Framework\Registry\Registry, |
|
18 | -PH7\Framework\Mvc\Model\Engine\Db, |
|
19 | -PH7\Framework\Mvc\Model\DbConfig, |
|
20 | -PH7\Framework\Url\Url, |
|
21 | -PH7\Framework\Ip\Ip, |
|
22 | -PH7\Framework\Geo\Ip\Geo, |
|
23 | -PH7\Framework\Str\Str, |
|
24 | -PH7\Framework\File\File, |
|
25 | -PH7\Framework\Session\Session, |
|
26 | -PH7\Framework\Navigation\Page, |
|
27 | -PH7\Framework\Geo\Misc\Country, |
|
28 | -PH7\Framework\Benchmark\Benchmark, |
|
29 | -PH7\Framework\Layout\Tpl\Engine\PH7Tpl\PH7Tpl, |
|
30 | -PH7\Framework\Module\Various as SysMod, |
|
31 | -PH7\Framework\Mvc\Request\Http, |
|
32 | -PH7\Framework\Mvc\Router\Uri; |
|
15 | +use PH7\Framework\Core\Kernel; |
|
16 | +use PH7\Framework\Registry\Registry; |
|
17 | +use PH7\Framework\Mvc\Model\Engine\Db; |
|
18 | +use PH7\Framework\Mvc\Model\DbConfig; |
|
19 | +use PH7\Framework\Url\Url; |
|
20 | +use PH7\Framework\Ip\Ip; |
|
21 | +use PH7\Framework\Geo\Ip\Geo; |
|
22 | +use PH7\Framework\Str\Str; |
|
23 | +use PH7\Framework\File\File; |
|
24 | +use PH7\Framework\Session\Session; |
|
25 | +use PH7\Framework\Navigation\Page; |
|
26 | +use PH7\Framework\Geo\Misc\Country; |
|
27 | +use PH7\Framework\Benchmark\Benchmark; |
|
28 | +use PH7\Framework\Layout\Tpl\Engine\PH7Tpl\PH7Tpl; |
|
29 | +use PH7\Framework\Module\Various as SysMod; |
|
30 | +use PH7\Framework\Mvc\Request\Http; |
|
31 | +use PH7\Framework\Mvc\Router\Uri; |
|
33 | 32 | |
34 | 33 | class Design |
35 | 34 | { |
@@ -35,7 +35,7 @@ |
||
35 | 35 | * @see get() |
36 | 36 | * |
37 | 37 | * @param boolean $bPrint Default FALSE |
38 | - * @return void |
|
38 | + * @return null|string |
|
39 | 39 | */ |
40 | 40 | public function display($bPrint = false) |
41 | 41 | { |
@@ -108,6 +108,7 @@ discard block |
||
108 | 108 | * |
109 | 109 | * @param mixed (array or string) $mKey The key of the request or an array with the list of key of the variables request. |
110 | 110 | * @param string $sParam Optional parameter, check the type of the request variable | Value type is: str, int, float, bool |
111 | + * @param string $mKey |
|
111 | 112 | * @return boolean |
112 | 113 | */ |
113 | 114 | public function postExists($mKey, $sParam = null) |
@@ -280,6 +281,7 @@ discard block |
||
280 | 281 | } |
281 | 282 | |
282 | 283 | /** |
284 | + * @param string $sUrl |
|
283 | 285 | * @return string The correct pH7's URL. |
284 | 286 | */ |
285 | 287 | public function pH7Url($sUrl) |
@@ -15,9 +15,8 @@ |
||
15 | 15 | namespace PH7\Framework\Mvc\Request; |
16 | 16 | defined('PH7') or exit('Restricted access'); |
17 | 17 | |
18 | -use |
|
19 | -PH7\Framework\Registry\Registry, |
|
20 | -PH7\Framework\Security as Secty; |
|
18 | +use PH7\Framework\Registry\Registry; |
|
19 | +use PH7\Framework\Security as Secty; |
|
21 | 20 | |
22 | 21 | /** |
23 | 22 | * Small example of using this class. |