@@ -1613,7 +1613,7 @@ discard block |
||
1613 | 1613 | /** |
1614 | 1614 | * Set page orientation. |
1615 | 1615 | * @param string $orientation page orientation. Possible values are (case insensitive):<ul><li>P or PORTRAIT (default)</li><li>L or LANDSCAPE</li></ul> |
1616 | - * @param boolean $autopagebreak Boolean indicating if auto-page-break mode should be on or off. |
|
1616 | + * @param string|boolean $autopagebreak Boolean indicating if auto-page-break mode should be on or off. |
|
1617 | 1617 | * @param float $bottommargin bottom margin of the page. |
1618 | 1618 | * @access public |
1619 | 1619 | * @since 3.0.015 (2008-06-06) |
@@ -1812,7 +1812,7 @@ discard block |
||
1812 | 1812 | * Defines the left, top and right margins. By default, they equal 1 cm. Call this method to change them. |
1813 | 1813 | * @param float $left Left margin. |
1814 | 1814 | * @param float $top Top margin. |
1815 | - * @param float $right Right margin. Default value is the left one. |
|
1815 | + * @param integer $right Right margin. Default value is the left one. |
|
1816 | 1816 | * @access public |
1817 | 1817 | * @since 1.0 |
1818 | 1818 | * @see SetLeftMargin(), SetTopMargin(), SetRightMargin(), SetAutoPageBreak() |
@@ -1885,7 +1885,7 @@ discard block |
||
1885 | 1885 | /** |
1886 | 1886 | * Enables or disables the automatic page breaking mode. When enabling, the second parameter is the distance from the bottom of the page that defines the triggering limit. By default, the mode is on and the margin is 2 cm. |
1887 | 1887 | * @param boolean $auto Boolean indicating if mode should be on or off. |
1888 | - * @param float $margin Distance from the bottom of the page. |
|
1888 | + * @param integer $margin Distance from the bottom of the page. |
|
1889 | 1889 | * @access public |
1890 | 1890 | * @since 1.0 |
1891 | 1891 | * @see Cell(), MultiCell(), AcceptPageBreak() |
@@ -1899,7 +1899,7 @@ discard block |
||
1899 | 1899 | |
1900 | 1900 | /** |
1901 | 1901 | * Defines the way the document is to be displayed by the viewer. |
1902 | - * @param mixed $zoom The zoom to use. It can be one of the following string values or a number indicating the zooming factor to use. <ul><li>fullpage: displays the entire page on screen </li><li>fullwidth: uses maximum width of window</li><li>real: uses real size (equivalent to 100% zoom)</li><li>default: uses viewer default mode</li></ul> |
|
1902 | + * @param string $zoom The zoom to use. It can be one of the following string values or a number indicating the zooming factor to use. <ul><li>fullpage: displays the entire page on screen </li><li>fullwidth: uses maximum width of window</li><li>real: uses real size (equivalent to 100% zoom)</li><li>default: uses viewer default mode</li></ul> |
|
1903 | 1903 | * @param string $layout The page layout. Possible values are:<ul><li>SinglePage Display one page at a time</li><li>OneColumn Display the pages in one column</li><li>TwoColumnLeft Display the pages in two columns, with odd-numbered pages on the left</li><li>TwoColumnRight Display the pages in two columns, with odd-numbered pages on the right</li><li>TwoPageLeft (PDF 1.5) Display the pages two at a time, with odd-numbered pages on the left</li><li>TwoPageRight (PDF 1.5) Display the pages two at a time, with odd-numbered pages on the right</li></ul> |
1904 | 1904 | * @param string $mode A name object specifying how the document should be displayed when opened:<ul><li>UseNone Neither document outline nor thumbnail images visible</li><li>UseOutlines Document outline visible</li><li>UseThumbs Thumbnail images visible</li><li>FullScreen Full-screen mode, with no menu bar, window controls, or any other window visible</li><li>UseOC (PDF 1.5) Optional content group panel visible</li><li>UseAttachments (PDF 1.6) Attachments panel visible</li></ul> |
1905 | 1905 | * @access public |
@@ -2283,7 +2283,7 @@ discard block |
||
2283 | 2283 | /** |
2284 | 2284 | * Set header data. |
2285 | 2285 | * @param string $ln header image logo |
2286 | - * @param string $lw header image logo width in mm |
|
2286 | + * @param integer $lw header image logo width in mm |
|
2287 | 2287 | * @param string $ht string to print as title on document header |
2288 | 2288 | * @param string $hs string to print on document header |
2289 | 2289 | * @access public |
@@ -2361,7 +2361,7 @@ discard block |
||
2361 | 2361 | |
2362 | 2362 | /** |
2363 | 2363 | * Set a flag to print page footer. |
2364 | - * @param boolean $value set to true to print the page footer (default), false otherwise. |
|
2364 | + * @param boolean $val set to true to print the page footer (default), false otherwise. |
|
2365 | 2365 | * @access public |
2366 | 2366 | */ |
2367 | 2367 | public function setPrintFooter($val=true) { |
@@ -2841,7 +2841,7 @@ discard block |
||
2841 | 2841 | * @param string $s The string whose length is to be computed |
2842 | 2842 | * @param string $fontname Family font. It can be either a name defined by AddFont() or one of the standard families. It is also possible to pass an empty string, in that case, the current family is retained. |
2843 | 2843 | * @param string $fontstyle Font style. Possible values are (case insensitive):<ul><li>empty string: regular</li><li>B: bold</li><li>I: italic</li><li>U: underline</li><li>D: line trough</li></ul> or any combination. The default value is regular. |
2844 | - * @param float $fontsize Font size in points. The default value is the current size. |
|
2844 | + * @param integer $fontsize Font size in points. The default value is the current size. |
|
2845 | 2845 | * @return int string length |
2846 | 2846 | * @author Nicola Asuni |
2847 | 2847 | * @access public |
@@ -2853,14 +2853,7 @@ discard block |
||
2853 | 2853 | |
2854 | 2854 | /** |
2855 | 2855 | * Returns the string length of an array of chars in user unit. A font must be selected.<br> |
2856 | - * @param string $arr The array of chars whose total length is to be computed |
|
2857 | - * @param string $fontname Family font. It can be either a name defined by AddFont() or one of the standard families. It is also possible to pass an empty string, in that case, the current family is retained. |
|
2858 | - * @param string $fontstyle Font style. Possible values are (case insensitive):<ul><li>empty string: regular</li><li>B: bold</li><li>I: italic</li><li>U: underline</li><li>D: line trough</li></ul> or any combination. The default value is regular. |
|
2859 | - * @param float $fontsize Font size in points. The default value is the current size. |
|
2860 | - * @return int string length |
|
2861 | - * @author Nicola Asuni |
|
2862 | - * @access public |
|
2863 | - * @since 2.4.000 (2008-03-06) |
|
2856 | + * @param integer $fontsize |
|
2864 | 2857 | */ |
2865 | 2858 | public function GetArrStringWidth($sa, $fontname='', $fontstyle='', $fontsize=0) { |
2866 | 2859 | // store current values |
@@ -3110,7 +3103,7 @@ discard block |
||
3110 | 3103 | * Note: for the standard fonts, the font metric files must be accessible. There are three possibilities for this:<ul><li>They are in the current directory (the one where the running script lies)</li><li>They are in one of the directories defined by the include_path parameter</li><li>They are in the directory defined by the K_PATH_FONTS constant</li></ul><br /> |
3111 | 3104 | * @param string $family Family font. It can be either a name defined by AddFont() or one of the standard Type1 families (case insensitive):<ul><li>times (Times-Roman)</li><li>timesb (Times-Bold)</li><li>timesi (Times-Italic)</li><li>timesbi (Times-BoldItalic)</li><li>helvetica (Helvetica)</li><li>helveticab (Helvetica-Bold)</li><li>helveticai (Helvetica-Oblique)</li><li>helveticabi (Helvetica-BoldOblique)</li><li>courier (Courier)</li><li>courierb (Courier-Bold)</li><li>courieri (Courier-Oblique)</li><li>courierbi (Courier-BoldOblique)</li><li>symbol (Symbol)</li><li>zapfdingbats (ZapfDingbats)</li></ul> It is also possible to pass an empty string. In that case, the current family is retained. |
3112 | 3105 | * @param string $style Font style. Possible values are (case insensitive):<ul><li>empty string: regular</li><li>B: bold</li><li>I: italic</li><li>U: underline</li><li>D: line trough</li></ul> or any combination. The default value is regular. Bold and italic styles do not apply to Symbol and ZapfDingbats basic fonts or other fonts when not defined. |
3113 | - * @param float $size Font size in points. The default value is the current size. If no size has been specified since the beginning of the document, the value taken is 12 |
|
3106 | + * @param integer $size Font size in points. The default value is the current size. If no size has been specified since the beginning of the document, the value taken is 12 |
|
3114 | 3107 | * @param string $fontfile The font definition file. By default, the name is built from the family and style, in lower case with no spaces. |
3115 | 3108 | * @access public |
3116 | 3109 | * @since 1.0 |
@@ -3182,7 +3175,7 @@ discard block |
||
3182 | 3175 | /** |
3183 | 3176 | * Defines the page and position a link points to. |
3184 | 3177 | * @param int $link The link identifier returned by AddLink() |
3185 | - * @param float $y Ordinate of target position; -1 indicates the current position. The default value is 0 (top of page) |
|
3178 | + * @param integer $y Ordinate of target position; -1 indicates the current position. The default value is 0 (top of page) |
|
3186 | 3179 | * @param int $page Number of target page; -1 indicates the current page. This is the default value |
3187 | 3180 | * @access public |
3188 | 3181 | * @since 1.5 |
@@ -3358,7 +3351,7 @@ discard block |
||
3358 | 3351 | |
3359 | 3352 | /** |
3360 | 3353 | * Add page if needed. |
3361 | - * @param float $h Cell height. Default value: 0. |
|
3354 | + * @param integer $h Cell height. Default value: 0. |
|
3362 | 3355 | * @param mixed $y starting y position, leave empty for current position. |
3363 | 3356 | * @return boolean true in case of page break, false otherwise. |
3364 | 3357 | * @since 3.2.000 (2008-07-01) |
@@ -3396,9 +3389,9 @@ discard block |
||
3396 | 3389 | * Prints a cell (rectangular area) with optional borders, background color and character string. The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line. It is possible to put a link on the text.<br /> |
3397 | 3390 | * If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting. |
3398 | 3391 | * @param float $w Cell width. If 0, the cell extends up to the right margin. |
3399 | - * @param float $h Cell height. Default value: 0. |
|
3392 | + * @param integer $h Cell height. Default value: 0. |
|
3400 | 3393 | * @param string $txt String to print. Default value: empty string. |
3401 | - * @param mixed $border Indicates if borders must be drawn around the cell. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> |
|
3394 | + * @param integer $border Indicates if borders must be drawn around the cell. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> |
|
3402 | 3395 | * @param int $ln Indicates where the current position should go after the call. Possible values are:<ul><li>0: to the right (or left for RTL languages)</li><li>1: to the beginning of the next line</li><li>2: below</li></ul> |
3403 | 3396 | Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0. |
3404 | 3397 | * @param string $align Allows to center or align the text. Possible values are:<ul><li>L or empty string: left align (default value)</li><li>C: center</li><li>R: right align</li><li>J: justify</li></ul> |
@@ -3449,9 +3442,9 @@ discard block |
||
3449 | 3442 | * Returns the PDF string code to print a cell (rectangular area) with optional borders, background color and character string. The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line. It is possible to put a link on the text.<br /> |
3450 | 3443 | * If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting. |
3451 | 3444 | * @param float $w Cell width. If 0, the cell extends up to the right margin. |
3452 | - * @param float $h Cell height. Default value: 0. |
|
3445 | + * @param integer $h Cell height. Default value: 0. |
|
3453 | 3446 | * @param string $txt String to print. Default value: empty string. |
3454 | - * @param mixed $border Indicates if borders must be drawn around the cell. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> |
|
3447 | + * @param integer $border Indicates if borders must be drawn around the cell. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> |
|
3455 | 3448 | * @param int $ln Indicates where the current position should go after the call. Possible values are:<ul><li>0: to the right (or left for RTL languages)</li><li>1: to the beginning of the next line</li><li>2: below</li></ul>Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0. |
3456 | 3449 | * @param string $align Allows to center or align the text. Possible values are:<ul><li>L or empty string: left align (default value)</li><li>C: center</li><li>R: right align</li><li>J: justify</li></ul> |
3457 | 3450 | * @param int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0. |
@@ -3681,7 +3674,7 @@ discard block |
||
3681 | 3674 | * @param float $w Width of cells. If 0, they extend up to the right margin of the page. |
3682 | 3675 | * @param float $h Cell minimum height. The cell extends automatically if needed. |
3683 | 3676 | * @param string $txt String to print |
3684 | - * @param mixed $border Indicates if borders must be drawn around the cell block. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> |
|
3677 | + * @param integer $border Indicates if borders must be drawn around the cell block. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> |
|
3685 | 3678 | * @param string $align Allows to center or align the text. Possible values are:<ul><li>L or empty string: left align</li><li>C: center</li><li>R: right align</li><li>J: justification (default value when $ishtml=false)</li></ul> |
3686 | 3679 | * @param int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0. |
3687 | 3680 | * @param int $ln Indicates where the current position should go after the call. Possible values are:<ul><li>0: to the right</li><li>1: to the beginning of the next line [DEFAULT]</li><li>2: below</li></ul> |
@@ -3691,7 +3684,7 @@ discard block |
||
3691 | 3684 | * @param int $stretch stretch carachter mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if necessary</li><li>4 = forced character spacing</li></ul> |
3692 | 3685 | * @param boolean $ishtml set to true if $txt is HTML content (default = false). |
3693 | 3686 | * @param boolean $autopadding if true, uses internal padding and automatically adjust it to account for line width. |
3694 | - * @param float $maxh maximum height. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. This feature works only when $ishtml=false. |
|
3687 | + * @param integer $maxh maximum height. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. This feature works only when $ishtml=false. |
|
3695 | 3688 | * @return int Return the number of cells or 1 for html mode. |
3696 | 3689 | * @access public |
3697 | 3690 | * @since 1.3 |
@@ -3852,7 +3845,7 @@ discard block |
||
3852 | 3845 | |
3853 | 3846 | /** |
3854 | 3847 | * Get the border mode accounting for multicell position (opens bottom side of multicell crossing pages) |
3855 | - * @param mixed $border Indicates if borders must be drawn around the cell block. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> |
|
3848 | + * @param integer $border Indicates if borders must be drawn around the cell block. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> |
|
3856 | 3849 | * @param string multicell position: 'start', 'middle', 'end' |
3857 | 3850 | * @return border mode |
3858 | 3851 | * @access protected |
@@ -3932,7 +3925,7 @@ discard block |
||
3932 | 3925 | /** |
3933 | 3926 | * This method returns the estimated number of lines required to print the text. |
3934 | 3927 | * @param string $txt text to print |
3935 | - * @param float $w width of cell. If 0, they extend up to the right margin of the page. |
|
3928 | + * @param integer $w width of cell. If 0, they extend up to the right margin of the page. |
|
3936 | 3929 | * @return int Return the estimated number of lines. |
3937 | 3930 | * @access public |
3938 | 3931 | * @since 4.5.011 |
@@ -3975,8 +3968,8 @@ discard block |
||
3975 | 3968 | * @param int $stretch stretch carachter mode: <ul><li>0 = disabled</li><li>1 = horizontal scaling only if necessary</li><li>2 = forced horizontal scaling</li><li>3 = character spacing only if necessary</li><li>4 = forced character spacing</li></ul> |
3976 | 3969 | * @param boolean $firstline if true prints only the first line and return the remaining string. |
3977 | 3970 | * @param boolean $firstblock if true the string is the starting of a line. |
3978 | - * @param float $maxh maximum height. The remaining unprinted text will be returned. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. |
|
3979 | - * @return mixed Return the number of cells or the remaining string if $firstline = true. |
|
3971 | + * @param integer $maxh maximum height. The remaining unprinted text will be returned. It should be >= $h and less then remaining space to the bottom of the page, or 0 for disable this feature. |
|
3972 | + * @return string Return the number of cells or the remaining string if $firstline = true. |
|
3980 | 3973 | * @access public |
3981 | 3974 | * @since 1.5 |
3982 | 3975 | */ |
@@ -4316,7 +4309,7 @@ discard block |
||
4316 | 4309 | * @param string $strarr The input array of characters. |
4317 | 4310 | * @param int $start the starting element of $strarr. |
4318 | 4311 | * @param int $end first element that will not be returned. |
4319 | - * @return Return part of a string |
|
4312 | + * @return string part of a string |
|
4320 | 4313 | * @access public |
4321 | 4314 | */ |
4322 | 4315 | public function UTF8ArrSubString($strarr, $start='', $end='') { |
@@ -4338,7 +4331,7 @@ discard block |
||
4338 | 4331 | * @param string $uniarr The input array of characters. |
4339 | 4332 | * @param int $start the starting element of $strarr. |
4340 | 4333 | * @param int $end first element that will not be returned. |
4341 | - * @return Return part of a string |
|
4334 | + * @return string part of a string |
|
4342 | 4335 | * @access public |
4343 | 4336 | * @since 4.5.037 (2009-04-07) |
4344 | 4337 | */ |
@@ -4370,7 +4363,7 @@ discard block |
||
4370 | 4363 | /** |
4371 | 4364 | * Returns the unicode caracter specified by UTF-8 code |
4372 | 4365 | * @param int $c UTF-8 code |
4373 | - * @return Returns the specified character. |
|
4366 | + * @return string the specified character. |
|
4374 | 4367 | * @author Miguel Perez, Nicola Asuni |
4375 | 4368 | * @access public |
4376 | 4369 | * @since 2.3.000 (2008-03-05) |
@@ -4409,8 +4402,8 @@ discard block |
||
4409 | 4402 | * @param string $file Name of the file containing the image. |
4410 | 4403 | * @param float $x Abscissa of the upper-left corner. |
4411 | 4404 | * @param float $y Ordinate of the upper-left corner. |
4412 | - * @param float $w Width of the image in the page. If not specified or equal to zero, it is automatically calculated. |
|
4413 | - * @param float $h Height of the image in the page. If not specified or equal to zero, it is automatically calculated. |
|
4405 | + * @param integer $w Width of the image in the page. If not specified or equal to zero, it is automatically calculated. |
|
4406 | + * @param integer $h Height of the image in the page. If not specified or equal to zero, it is automatically calculated. |
|
4414 | 4407 | * @param string $type Image format. Possible values are (case insensitive): JPEG and PNG (whitout GD library) and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;. If not specified, the type is inferred from the file extension. |
4415 | 4408 | * @param mixed $link URL or identifier returned by AddLink(). |
4416 | 4409 | * @param string $align Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:<ul><li>T: top-right for LTR or top-left for RTL</li><li>M: middle-right for LTR or middle-left for RTL</li><li>B: bottom-right for LTR or bottom-left for RTL</li><li>N: next line</li></ul> |
@@ -4419,7 +4412,7 @@ discard block |
||
4419 | 4412 | * @param string $palign Allows to center or align the image on the current line. Possible values are:<ul><li>L : left align</li><li>C : center</li><li>R : right align</li><li>'' : empty string : left for LTR or right for RTL</li></ul> |
4420 | 4413 | * @param boolean $ismask true if this image is a mask, false otherwise |
4421 | 4414 | * @param mixed $imgmask image object returned by this function or false |
4422 | - * @param mixed $border Indicates if borders must be drawn around the image. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> |
|
4415 | + * @param integer $border Indicates if borders must be drawn around the image. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> |
|
4423 | 4416 | * @param boolean $fitbox If true scale image dimensions proportionally to fit within the ($w, $h) box. |
4424 | 4417 | * @return image information |
4425 | 4418 | * @access public |
@@ -4667,10 +4660,6 @@ discard block |
||
4667 | 4660 | /** |
4668 | 4661 | * Convert the loaded php image to a JPEG and then return a structure for the PDF creator. |
4669 | 4662 | * This function requires GD library and write access to the directory defined on K_PATH_CACHE constant. |
4670 | - * @param string $file Image file name. |
|
4671 | - * @param image $image Image object. |
|
4672 | - * return image JPEG image object. |
|
4673 | - * @access protected |
|
4674 | 4663 | */ |
4675 | 4664 | protected function _toJPEG($image) { |
4676 | 4665 | $tempname = tempnam(K_PATH_CACHE, 'jpg_'); |
@@ -4814,7 +4803,7 @@ discard block |
||
4814 | 4803 | * Reads up to length bytes from the file pointer referenced by handle. Reading stops as soon as one of the following conditions is met: length bytes have been read; EOF (end of file) is reached. |
4815 | 4804 | * @param resource $handle |
4816 | 4805 | * @param int $length |
4817 | - * @return Returns the read string or FALSE in case of error. |
|
4806 | + * @return false|string the read string or FALSE in case of error. |
|
4818 | 4807 | * @author Nicola Asuni |
4819 | 4808 | * @access protected |
4820 | 4809 | * @since 4.5.027 (2009-03-16) |
@@ -4836,8 +4825,8 @@ discard block |
||
4836 | 4825 | * @param string $file Name of the file containing the image. |
4837 | 4826 | * @param float $x Abscissa of the upper-left corner. |
4838 | 4827 | * @param float $y Ordinate of the upper-left corner. |
4839 | - * @param float $w Width of the image in the page. If not specified or equal to zero, it is automatically calculated. |
|
4840 | - * @param float $h Height of the image in the page. If not specified or equal to zero, it is automatically calculated. |
|
4828 | + * @param integer $w Width of the image in the page. If not specified or equal to zero, it is automatically calculated. |
|
4829 | + * @param integer $h Height of the image in the page. If not specified or equal to zero, it is automatically calculated. |
|
4841 | 4830 | * @param string $type Image format. Possible values are (case insensitive): JPEG and PNG (whitout GD library) and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;. If not specified, the type is inferred from the file extension. |
4842 | 4831 | * @param mixed $link URL or identifier returned by AddLink(). |
4843 | 4832 | * @param string $align Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:<ul><li>T: top-right for LTR or top-left for RTL</li><li>M: middle-right for LTR or middle-left for RTL</li><li>B: bottom-right for LTR or bottom-left for RTL</li><li>N: next line</li></ul> |
@@ -6994,8 +6983,8 @@ discard block |
||
6994 | 6983 | * @param int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0. |
6995 | 6984 | * @param boolean $firstline if true prints only the first line and return the remaining string. |
6996 | 6985 | * @param array $color array of RGB text color |
6997 | - * @param string $style font style (U, D, B, I) |
|
6998 | - * @return the number of cells used or the remaining text if $firstline = true; |
|
6986 | + * @param integer $style font style (U, D, B, I) |
|
6987 | + * @return string number of cells used or the remaining text if $firstline = true; |
|
6999 | 6988 | * @access public |
7000 | 6989 | */ |
7001 | 6990 | public function addHtmlLink($url, $name, $fill=0, $firstline=false, $color='', $style=-1) { |
@@ -7408,7 +7397,7 @@ discard block |
||
7408 | 7397 | |
7409 | 7398 | /** |
7410 | 7399 | * Reflection against a straight line through point (x, y) with the gradient angle (angle). |
7411 | - * @param float $angle gradient angle of the straight line. Default is 0 (horizontal line). |
|
7400 | + * @param integer $angle gradient angle of the straight line. Default is 0 (horizontal line). |
|
7412 | 7401 | * @param int $x abscissa of the point. Default is current x position |
7413 | 7402 | * @param int $y ordinate of the point. Default is current y position |
7414 | 7403 | * @access public |
@@ -7600,7 +7589,7 @@ discard block |
||
7600 | 7589 | |
7601 | 7590 | /** |
7602 | 7591 | * Returns the current the line width. |
7603 | - * @return int Line width |
|
7592 | + * @return double Line width |
|
7604 | 7593 | * @access public |
7605 | 7594 | * @since 2.1.000 (2008-01-07) |
7606 | 7595 | * @see Line(), SetLineWidth() |
@@ -7990,7 +7979,7 @@ discard block |
||
7990 | 7979 | * @param float $x0 Abscissa of center point. |
7991 | 7980 | * @param float $y0 Ordinate of center point. |
7992 | 7981 | * @param float $rx Horizontal radius. |
7993 | - * @param float $ry Vertical radius (if ry = 0 then is a circle, see {@link Circle Circle}). Default value: 0. |
|
7982 | + * @param integer $ry Vertical radius (if ry = 0 then is a circle, see {@link Circle Circle}). Default value: 0. |
|
7994 | 7983 | * @param float $angle: Angle oriented (anti-clockwise). Default value: 0. |
7995 | 7984 | * @param float $astart: Angle start of draw line. Default value: 0. |
7996 | 7985 | * @param float $afinish: Angle finish of draw line. Default value: 360. |
@@ -8205,37 +8194,7 @@ discard block |
||
8205 | 8194 | * Draws a regular polygon. |
8206 | 8195 | * @param float $x0 Abscissa of center point. |
8207 | 8196 | * @param float $y0 Ordinate of center point. |
8208 | - * @param float $r: Radius of inscribed circle. |
|
8209 | - * @param integer $ns Number of sides. |
|
8210 | - * @param float $angle Angle oriented (anti-clockwise). Default value: 0. |
|
8211 | - * @param boolean $draw_circle Draw inscribed circle or not. Default value: false. |
|
8212 | - * @param string $style Style of rendering. Possible values are: |
|
8213 | - * <ul> |
|
8214 | - * <li>D or empty string: Draw (default).</li> |
|
8215 | - * <li>F: Fill.</li> |
|
8216 | - * <li>DF or FD: Draw and fill.</li> |
|
8217 | - * <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li> |
|
8218 | - * <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li> |
|
8219 | - * </ul> |
|
8220 | - * @param array $line_style Line style of polygon sides. Array with keys among the following: |
|
8221 | - * <ul> |
|
8222 | - * <li>all: Line style of all sides. Array like for {@link SetLineStyle SetLineStyle}.</li> |
|
8223 | - * <li>0 to ($ns - 1): Line style of each side. Array like for {@link SetLineStyle SetLineStyle}.</li> |
|
8224 | - * </ul> |
|
8225 | - * If a key is not present or is null, not draws the side. Default value is default line style (empty array). |
|
8226 | - * @param array $fill_color Fill color. Format: array(red, green, blue). Default value: default color (empty array). |
|
8227 | - * @param string $circle_style Style of rendering of inscribed circle (if draws). Possible values are: |
|
8228 | - * <ul> |
|
8229 | - * <li>D or empty string: Draw (default).</li> |
|
8230 | - * <li>F: Fill.</li> |
|
8231 | - * <li>DF or FD: Draw and fill.</li> |
|
8232 | - * <li>CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).</li> |
|
8233 | - * <li>CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).</li> |
|
8234 | - * </ul> |
|
8235 | - * @param array $circle_outLine_style Line style of inscribed circle (if draws). Array like for {@link SetLineStyle SetLineStyle}. Default value: default line style (empty array). |
|
8236 | - * @param array $circle_fill_color Fill color of inscribed circle (if draws). Format: array(red, green, blue). Default value: default color (empty array). |
|
8237 | - * @access public |
|
8238 | - * @since 2.1.000 (2008-01-08) |
|
8197 | + * @param integer $angle |
|
8239 | 8198 | */ |
8240 | 8199 | public function RegularPolygon($x0, $y0, $r, $ns, $angle=0, $draw_circle=false, $style='', $line_style=array(), $fill_color=array(), $circle_style='', $circle_outLine_style=array(), $circle_fill_color=array()) { |
8241 | 8200 | if (3 > $ns) { |
@@ -9854,8 +9813,8 @@ discard block |
||
9854 | 9813 | * @param array $col3 third color (upper right corner) (RGB components). |
9855 | 9814 | * @param array $col4 fourth color (upper left corner) (RGB components). |
9856 | 9815 | * @param array $coords <ul><li>for one patch mesh: array(float x1, float y1, .... float x12, float y12): 12 pairs of coordinates (normally from 0 to 1) which specify the Bezier control points that define the patch. First pair is the lower left edge point, next is its right control point (control point 2). Then the other points are defined in the order: control point 1, edge point, control point 2 going counter-clockwise around the patch. Last (x12, y12) is the first edge point's left control point (control point 1).</li><li>for two or more patch meshes: array[number of patches]: arrays with the following keys for each patch: f: where to put that patch (0 = first patch, 1, 2, 3 = right, top and left of precedent patch - I didn't figure this out completely - just try and error ;-) points: 12 pairs of coordinates of the Bezier control points as above for the first patch, 8 pairs of coordinates for the following patches, ignoring the coordinates already defined by the precedent patch (I also didn't figure out the order of these - also: try and see what's happening) colors: must be 4 colors for the first patch, 2 colors for the following patches</li></ul> |
9857 | - * @param array $coords_min minimum value used by the coordinates. If a coordinate's value is smaller than this it will be cut to coords_min. default: 0 |
|
9858 | - * @param array $coords_max maximum value used by the coordinates. If a coordinate's value is greater than this it will be cut to coords_max. default: 1 |
|
9816 | + * @param integer $coords_min minimum value used by the coordinates. If a coordinate's value is smaller than this it will be cut to coords_min. default: 0 |
|
9817 | + * @param integer $coords_max maximum value used by the coordinates. If a coordinate's value is greater than this it will be cut to coords_max. default: 1 |
|
9859 | 9818 | * @author Andreas W�rmser, Nicola Asuni |
9860 | 9819 | * @since 3.1.000 (2008-06-09) |
9861 | 9820 | * @access public |
@@ -10036,6 +9995,12 @@ discard block |
||
10036 | 9995 | * @author Maxime Delorme, Nicola Asuni |
10037 | 9996 | * @since 3.1.000 (2008-06-09) |
10038 | 9997 | * @access protected |
9998 | + * @param double $x1 |
|
9999 | + * @param double $y1 |
|
10000 | + * @param double $x2 |
|
10001 | + * @param double $y2 |
|
10002 | + * @param double $x3 |
|
10003 | + * @param double $y3 |
|
10039 | 10004 | */ |
10040 | 10005 | protected function _outarc($x1, $y1, $x2, $y2, $x3, $y3 ) { |
10041 | 10006 | $h = $this->h; |
@@ -10052,10 +10017,6 @@ discard block |
||
10052 | 10017 | * @param float $b end angle (in degrees). |
10053 | 10018 | * @param string $style: D, F, FD or DF (draw, fill, fill and draw). Default: FD. |
10054 | 10019 | * @param float $cw: indicates whether to go clockwise (default: true). |
10055 | - * @param float $o: origin of angles (0 for 3 o'clock, 90 for noon, 180 for 9 o'clock, 270 for 6 o'clock). Default: 90. |
|
10056 | - * @author Maxime Delorme, Nicola Asuni |
|
10057 | - * @since 3.1.000 (2008-06-09) |
|
10058 | - * @access public |
|
10059 | 10020 | */ |
10060 | 10021 | public function PieSector($xc, $yc, $r, $a, $b, $style='FD', $cw=true, $o=90) { |
10061 | 10022 | if ($this->rtl) { |
@@ -10124,13 +10085,13 @@ discard block |
||
10124 | 10085 | * @param string $file Name of the file containing the image. |
10125 | 10086 | * @param float $x Abscissa of the upper-left corner. |
10126 | 10087 | * @param float $y Ordinate of the upper-left corner. |
10127 | - * @param float $w Width of the image in the page. If not specified or equal to zero, it is automatically calculated. |
|
10128 | - * @param float $h Height of the image in the page. If not specified or equal to zero, it is automatically calculated. |
|
10088 | + * @param integer $w Width of the image in the page. If not specified or equal to zero, it is automatically calculated. |
|
10089 | + * @param integer $h Height of the image in the page. If not specified or equal to zero, it is automatically calculated. |
|
10129 | 10090 | * @param mixed $link URL or identifier returned by AddLink(). |
10130 | 10091 | * @param boolean useBoundingBox specifies whether to position the bounding box (true) or the complete canvas (false) at location (x,y). Default value is true. |
10131 | 10092 | * @param string $align Indicates the alignment of the pointer next to image insertion relative to image height. The value can be:<ul><li>T: top-right for LTR or top-left for RTL</li><li>M: middle-right for LTR or middle-left for RTL</li><li>B: bottom-right for LTR or bottom-left for RTL</li><li>N: next line</li></ul> |
10132 | 10093 | * @param string $palign Allows to center or align the image on the current line. Possible values are:<ul><li>L : left align</li><li>C : center</li><li>R : right align</li><li>'' : empty string : left for LTR or right for RTL</li></ul> |
10133 | - * @param mixed $border Indicates if borders must be drawn around the image. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> |
|
10094 | + * @param integer $border Indicates if borders must be drawn around the image. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> |
|
10134 | 10095 | * @author Valentin Schmidt, Nicola Asuni |
10135 | 10096 | * @since 3.1.000 (2008-06-09) |
10136 | 10097 | * @access public |
@@ -10904,7 +10865,7 @@ discard block |
||
10904 | 10865 | * @param float $x upper-left corner X coordinate |
10905 | 10866 | * @param float $y upper-left corner Y coordinate |
10906 | 10867 | * @param string $html html text to print. Default value: empty string. |
10907 | - * @param mixed $border Indicates if borders must be drawn around the cell. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> |
|
10868 | + * @param integer $border Indicates if borders must be drawn around the cell. The value can be either a number:<ul><li>0: no border (default)</li><li>1: frame</li></ul>or a string containing some or all of the following characters (in any order):<ul><li>L: left</li><li>T: top</li><li>R: right</li><li>B: bottom</li></ul> |
|
10908 | 10869 | * @param int $ln Indicates where the current position should go after the call. Possible values are:<ul><li>0: to the right (or left for RTL language)</li><li>1: to the beginning of the next line</li><li>2: below</li></ul> |
10909 | 10870 | Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0. |
10910 | 10871 | * @param int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0. |
@@ -12861,8 +12822,8 @@ discard block |
||
12861 | 12822 | /** |
12862 | 12823 | * Set the booklet mode for double-sided pages. |
12863 | 12824 | * @param boolean $booklet true set the booklet mode on, fals eotherwise. |
12864 | - * @param float $inner Inner page margin. |
|
12865 | - * @param float $outer Outer page margin. |
|
12825 | + * @param integer $inner Inner page margin. |
|
12826 | + * @param integer $outer Outer page margin. |
|
12866 | 12827 | * @access public |
12867 | 12828 | * @since 4.2.000 (2008-10-29) |
12868 | 12829 | */ |
@@ -12945,9 +12906,9 @@ discard block |
||
12945 | 12906 | /** |
12946 | 12907 | * convert html string containing value and unit of measure to user's units or points. |
12947 | 12908 | * @param string $htmlval string containing values and unit |
12948 | - * @param string $refsize reference value in points |
|
12909 | + * @param integer $refsize reference value in points |
|
12949 | 12910 | * @param string $defaultunit default unit (can be one of the following: %, em, ex, px, in, mm, pc, pt). |
12950 | - * @param boolean $point if true returns points, otherwise returns value in user's units |
|
12911 | + * @param boolean $points if true returns points, otherwise returns value in user's units |
|
12951 | 12912 | * @return float value in user's unit or point if $points=true |
12952 | 12913 | * @access public |
12953 | 12914 | * @since 4.4.004 (2008-12-10) |
@@ -13087,7 +13048,7 @@ discard block |
||
13087 | 13048 | * Output an HTML list bullet or ordered item symbol |
13088 | 13049 | * @param int $listdepth list nesting level |
13089 | 13050 | * @param string $listtype type of list |
13090 | - * @param float $size current font size |
|
13051 | + * @param integer $size current font size |
|
13091 | 13052 | * @access protected |
13092 | 13053 | * @since 4.4.004 (2008-12-10) |
13093 | 13054 | */ |
@@ -13292,10 +13253,7 @@ discard block |
||
13292 | 13253 | |
13293 | 13254 | /** |
13294 | 13255 | * Returns a temporary filename for caching object on filesystem. |
13295 | - * @param string $prefix prefix to add to filename |
|
13296 | - * return string filename. |
|
13297 | - * @access protected |
|
13298 | - * @since 4.5.000 (2008-12-31) |
|
13256 | + * @param string $name |
|
13299 | 13257 | */ |
13300 | 13258 | protected function getObjFilename($name) { |
13301 | 13259 | return tempnam(K_PATH_CACHE, $name.'_'); |
@@ -13303,11 +13261,7 @@ discard block |
||
13303 | 13261 | |
13304 | 13262 | /** |
13305 | 13263 | * Writes data to a temporary file on filesystem. |
13306 | - * @param string $file file name |
|
13307 | - * @param mixed $data data to write on file |
|
13308 | - * @param boolean $append if true append data, false replace. |
|
13309 | - * @access protected |
|
13310 | - * @since 4.5.000 (2008-12-31) |
|
13264 | + * @param string $data |
|
13311 | 13265 | */ |
13312 | 13266 | protected function writeDiskCache($filename, $data, $append=false) { |
13313 | 13267 | if ($append) { |
@@ -13332,10 +13286,7 @@ discard block |
||
13332 | 13286 | |
13333 | 13287 | /** |
13334 | 13288 | * Read data from a temporary file on filesystem. |
13335 | - * @param string $file file name |
|
13336 | - * @return mixed retrieved data |
|
13337 | - * @access protected |
|
13338 | - * @since 4.5.000 (2008-12-31) |
|
13289 | + * @return string |
|
13339 | 13290 | */ |
13340 | 13291 | protected function readDiskCache($filename) { |
13341 | 13292 | return file_get_contents($filename); |
@@ -13538,7 +13489,7 @@ discard block |
||
13538 | 13489 | * Move a page to a previous position. |
13539 | 13490 | * @param int $frompage number of the source page |
13540 | 13491 | * @param int $topage number of the destination page (must be less than $frompage) |
13541 | - * @return true in case of success, false in case of error. |
|
13492 | + * @return boolean in case of success, false in case of error. |
|
13542 | 13493 | * @access public |
13543 | 13494 | * @since 4.5.000 (2009-01-02) |
13544 | 13495 | */ |
@@ -13675,7 +13626,7 @@ discard block |
||
13675 | 13626 | /** |
13676 | 13627 | * Remove the specified page. |
13677 | 13628 | * @param int $page page to remove |
13678 | - * @return true in case of success, false in case of error. |
|
13629 | + * @return boolean in case of success, false in case of error. |
|
13679 | 13630 | * @access public |
13680 | 13631 | * @since 4.6.004 (2009-04-23) |
13681 | 13632 | */ |
@@ -14007,7 +13958,7 @@ discard block |
||
14007 | 13958 | |
14008 | 13959 | /** |
14009 | 13960 | * Creates a copy of a class object |
14010 | - * @param object $object class object to be cloned |
|
13961 | + * @param TCPDF $object class object to be cloned |
|
14011 | 13962 | * @return cloned object |
14012 | 13963 | * @access public |
14013 | 13964 | * @since 4.5.029 (2009-03-19) |
@@ -310,7 +310,7 @@ |
||
310 | 310 | * This function creates the $sqs_objects array that will be used by the quicksearch Javascript |
311 | 311 | * code. The $sqs_objects array is wrapped in a $json->encode call. |
312 | 312 | * |
313 | - * @param array $def The vardefs.php definitions |
|
313 | + * @param array $defs The vardefs.php definitions |
|
314 | 314 | * @param array $defs2 The Meta-Data file definitions |
315 | 315 | * @param string $view |
316 | 316 | * @param strign $module |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | /** |
422 | 422 | * Retrieve the cache key used for user date/time formats |
423 | 423 | * |
424 | - * @param $user |
|
424 | + * @param null|User $user |
|
425 | 425 | * @return string |
426 | 426 | */ |
427 | 427 | public function get_date_time_format_cache_key($user) |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | * Split datetime string into date & time |
479 | 479 | * |
480 | 480 | * @param string $datetime |
481 | - * @return array |
|
481 | + * @return string |
|
482 | 482 | */ |
483 | 483 | function split_date_time($datetime) |
484 | 484 | { |
@@ -1117,7 +1117,7 @@ discard block |
||
1117 | 1117 | * |
1118 | 1118 | * @param string $date |
1119 | 1119 | * @param string $time |
1120 | - * @return array Date & time in DB format |
|
1120 | + * @return string[] Date & time in DB format |
|
1121 | 1121 | **/ |
1122 | 1122 | public function to_db_date_time($date, $time) |
1123 | 1123 | { |
@@ -1225,7 +1225,7 @@ discard block |
||
1225 | 1225 | /** |
1226 | 1226 | * Find out format's time separator |
1227 | 1227 | * @param string $timeformat Time format |
1228 | - * @return stringS |
|
1228 | + * @return string |
|
1229 | 1229 | */ |
1230 | 1230 | public function timeSeparatorFormat($timeformat) |
1231 | 1231 | { |
@@ -1310,7 +1310,7 @@ discard block |
||
1310 | 1310 | /** |
1311 | 1311 | * Get midnight (start of the day) in local time format |
1312 | 1312 | * |
1313 | - * @return Time string |
|
1313 | + * @return string string |
|
1314 | 1314 | */ |
1315 | 1315 | function get_default_midnight() |
1316 | 1316 | { |
@@ -1748,7 +1748,7 @@ discard block |
||
1748 | 1748 | /** |
1749 | 1749 | * @deprecated for public use |
1750 | 1750 | * handles offset values for Timezones and DST |
1751 | - * @param $date string date/time formatted in user's selected format |
|
1751 | + * @param string $date string date/time formatted in user's selected format |
|
1752 | 1752 | * @param $format string destination format value as passed to PHP's date() funtion |
1753 | 1753 | * @param $to boolean |
1754 | 1754 | * @param $user object user object from which Timezone and DST |
@@ -829,6 +829,7 @@ discard block |
||
829 | 829 | * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. |
830 | 830 | * All Rights Reserved. |
831 | 831 | * Contributor(s): ______________________________________.. |
832 | + * @param boolean $always_copy |
|
832 | 833 | */ |
833 | 834 | function safe_map_named($request_var, & $focus, $member_var, $always_copy) |
834 | 835 | { |
@@ -1248,6 +1249,7 @@ discard block |
||
1248 | 1249 | * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. |
1249 | 1250 | * All Rights Reserved. |
1250 | 1251 | * Contributor(s): ______________________________________.. |
1252 | + * @param string $varname |
|
1251 | 1253 | */ |
1252 | 1254 | function return_session_value_or_default($varname, $default) |
1253 | 1255 | { |
@@ -1358,6 +1360,9 @@ discard block |
||
1358 | 1360 | |
1359 | 1361 | } |
1360 | 1362 | |
1363 | +/** |
|
1364 | + * @param integer $characters |
|
1365 | + */ |
|
1361 | 1366 | function create_guid_section($characters) |
1362 | 1367 | { |
1363 | 1368 | $return = ""; |
@@ -1368,6 +1373,10 @@ discard block |
||
1368 | 1373 | return $return; |
1369 | 1374 | } |
1370 | 1375 | |
1376 | +/** |
|
1377 | + * @param string $string |
|
1378 | + * @param integer $length |
|
1379 | + */ |
|
1371 | 1380 | function ensure_length(&$string, $length) |
1372 | 1381 | { |
1373 | 1382 | $strlen = strlen($string); |
@@ -1475,6 +1484,9 @@ discard block |
||
1475 | 1484 | |
1476 | 1485 | |
1477 | 1486 | // Check if user is admin for a specific module. |
1487 | +/** |
|
1488 | + * @param string $module |
|
1489 | + */ |
|
1478 | 1490 | function is_admin_for_module($user,$module) { |
1479 | 1491 | if (!isset($user)) { |
1480 | 1492 | return false; |
@@ -1535,6 +1547,7 @@ discard block |
||
1535 | 1547 | * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. |
1536 | 1548 | * All Rights Reserved. |
1537 | 1549 | * Contributor(s): ______________________________________.. |
1550 | + * @param string $selected |
|
1538 | 1551 | */ |
1539 | 1552 | function get_select_options ($option_list, $selected) { |
1540 | 1553 | return get_select_options_with_id($option_list, $selected); |
@@ -1822,7 +1835,7 @@ discard block |
||
1822 | 1835 | |
1823 | 1836 | /** |
1824 | 1837 | * returns a default array of XSS tags to clean |
1825 | - * @return array |
|
1838 | + * @return string |
|
1826 | 1839 | */ |
1827 | 1840 | function getDefaultXssTags() { |
1828 | 1841 | $tmp = array( |
@@ -1849,6 +1862,7 @@ discard block |
||
1849 | 1862 | /** |
1850 | 1863 | * Remove potential xss vectors from strings |
1851 | 1864 | * @param string str String to search for XSS attack vectors |
1865 | + * @param string $str |
|
1852 | 1866 | * @deprecated |
1853 | 1867 | * @return string |
1854 | 1868 | */ |
@@ -1862,6 +1876,7 @@ discard block |
||
1862 | 1876 | * @deprecated |
1863 | 1877 | * @param string str String to search for XSS attack vectors |
1864 | 1878 | * @param bool cleanImg Flag to allow <img> tags to survive - only used by InboundEmail for inline images. |
1879 | + * @param string $str |
|
1865 | 1880 | * @return array Array of matches, empty on clean string |
1866 | 1881 | */ |
1867 | 1882 | function clean_xss($str, $cleanImg=true) { |
@@ -1938,6 +1953,7 @@ discard block |
||
1938 | 1953 | * Helper function used by clean_xss() to parse for known-bad vectors |
1939 | 1954 | * @param string pattern Regex pattern to use |
1940 | 1955 | * @param string str String to parse for badness |
1956 | + * @param string $pattern |
|
1941 | 1957 | * @return array |
1942 | 1958 | */ |
1943 | 1959 | function xss_check_pattern($pattern, $str) { |
@@ -2022,6 +2038,7 @@ discard block |
||
2022 | 2038 | |
2023 | 2039 | /** |
2024 | 2040 | * cleans the given key in superglobals $_GET, $_POST, $_REQUEST |
2041 | + * @param string $key |
|
2025 | 2042 | */ |
2026 | 2043 | function clean_superglobals($key, $filter = 'STANDARD') { |
2027 | 2044 | if(isset($_GET[$key])) clean_string($_GET[$key], $filter); |
@@ -2029,6 +2046,9 @@ discard block |
||
2029 | 2046 | if(isset($_REQUEST[$key])) clean_string($_REQUEST[$key], $filter); |
2030 | 2047 | } |
2031 | 2048 | |
2049 | +/** |
|
2050 | + * @param string $key |
|
2051 | + */ |
|
2032 | 2052 | function set_superglobals($key, $val){ |
2033 | 2053 | $_GET[$key] = $val; |
2034 | 2054 | $_POST[$key] = $val; |
@@ -2108,11 +2128,18 @@ discard block |
||
2108 | 2128 | } |
2109 | 2129 | |
2110 | 2130 | // Returns TRUE if $str begins with $begin |
2131 | +/** |
|
2132 | + * @param string $begin |
|
2133 | + */ |
|
2111 | 2134 | function str_begin($str, $begin) { |
2112 | 2135 | return (substr($str, 0, strlen($begin)) == $begin); |
2113 | 2136 | } |
2114 | 2137 | |
2115 | 2138 | // Returns TRUE if $str ends with $end |
2139 | +/** |
|
2140 | + * @param string $str |
|
2141 | + * @param string $end |
|
2142 | + */ |
|
2116 | 2143 | function str_end($str, $end) { |
2117 | 2144 | return (substr($str, strlen($str) - strlen($end)) == $end); |
2118 | 2145 | } |
@@ -2170,14 +2197,24 @@ discard block |
||
2170 | 2197 | } |
2171 | 2198 | |
2172 | 2199 | |
2200 | +/** |
|
2201 | + * @param string $category |
|
2202 | + */ |
|
2173 | 2203 | function set_register_value($category, $name, $value){ |
2174 | 2204 | return sugar_cache_put("{$category}:{$name}", $value); |
2175 | 2205 | } |
2176 | 2206 | |
2207 | +/** |
|
2208 | + * @param string $category |
|
2209 | + */ |
|
2177 | 2210 | function get_register_value($category,$name){ |
2178 | 2211 | return sugar_cache_retrieve("{$category}:{$name}"); |
2179 | 2212 | } |
2180 | 2213 | |
2214 | +/** |
|
2215 | + * @param string $category |
|
2216 | + * @param string $name |
|
2217 | + */ |
|
2181 | 2218 | function clear_register_value($category,$name){ |
2182 | 2219 | return sugar_cache_clear("{$category}:{$name}"); |
2183 | 2220 | } |
@@ -2379,6 +2416,11 @@ discard block |
||
2379 | 2416 | return $new_array; |
2380 | 2417 | } |
2381 | 2418 | |
2419 | +/** |
|
2420 | + * @param DBManager $db |
|
2421 | + * @param string $from_column |
|
2422 | + * @param string $to_id |
|
2423 | + */ |
|
2382 | 2424 | function clone_relationship(&$db, $tables = array(), $from_column, $from_id, $to_id) |
2383 | 2425 | { |
2384 | 2426 | foreach($tables as $table) |
@@ -2556,6 +2598,10 @@ discard block |
||
2556 | 2598 | return empty($value) && $value != '0'; |
2557 | 2599 | } |
2558 | 2600 | |
2601 | +/** |
|
2602 | + * @param string $bean_name |
|
2603 | + * @param string $display_columns |
|
2604 | + */ |
|
2559 | 2605 | function get_bean_select_array($add_blank=true, $bean_name, $display_columns, $where='', $order_by='', $blank_is_none=false) |
2560 | 2606 | { |
2561 | 2607 | global $beanFiles; |
@@ -2746,6 +2792,11 @@ discard block |
||
2746 | 2792 | //end function js_escape |
2747 | 2793 | } |
2748 | 2794 | |
2795 | +/** |
|
2796 | + * @param string $str |
|
2797 | + * |
|
2798 | + * @return string |
|
2799 | + */ |
|
2749 | 2800 | function br2nl($str) { |
2750 | 2801 | $regex = "#<[^>]+br.+?>#i"; |
2751 | 2802 | preg_match_all($regex, $str, $matches); |
@@ -3265,6 +3316,9 @@ discard block |
||
3265 | 3316 | |
3266 | 3317 | set_error_handler('StackTraceErrorHandler'); |
3267 | 3318 | } |
3319 | +/** |
|
3320 | + * @param string $name |
|
3321 | + */ |
|
3268 | 3322 | function get_sub_cookies($name){ |
3269 | 3323 | $cookies = array(); |
3270 | 3324 | if(isset($_COOKIE[$name])){ |
@@ -3306,6 +3360,7 @@ discard block |
||
3306 | 3360 | |
3307 | 3361 | /** |
3308 | 3362 | * For translating the php.ini memory values into bytes. e.g. input value of '8M' will return 8388608. |
3363 | + * @param string $val |
|
3309 | 3364 | */ |
3310 | 3365 | function return_bytes($val) |
3311 | 3366 | { |
@@ -3413,6 +3468,9 @@ discard block |
||
3413 | 3468 | * Given the bean_name which may be plural or singular return the singular |
3414 | 3469 | * bean_name. This is important when you need to include files. |
3415 | 3470 | */ |
3471 | +/** |
|
3472 | + * @return string |
|
3473 | + */ |
|
3416 | 3474 | function get_singular_bean_name($bean_name){ |
3417 | 3475 | global $beanFiles, $beanList; |
3418 | 3476 | if(array_key_exists($bean_name, $beanList)){ |
@@ -3457,6 +3515,9 @@ discard block |
||
3457 | 3515 | return $singular; |
3458 | 3516 | } |
3459 | 3517 | |
3518 | +/** |
|
3519 | + * @return string |
|
3520 | + */ |
|
3460 | 3521 | function get_label($label_tag, $temp_module_strings){ |
3461 | 3522 | global $app_strings; |
3462 | 3523 | if(!empty($temp_module_strings[$label_tag])){ |
@@ -3562,7 +3623,7 @@ discard block |
||
3562 | 3623 | /** |
3563 | 3624 | * In order to have one place to obtain the proper object name. aCase for example causes issues throughout the application. |
3564 | 3625 | * |
3565 | - * @param string $moduleName |
|
3626 | + * @param string $module_name |
|
3566 | 3627 | */ |
3567 | 3628 | function get_valid_bean_name($module_name){ |
3568 | 3629 | global $beanList; |
@@ -4139,6 +4200,9 @@ discard block |
||
4139 | 4200 | * @return string Relative pathname of the located icon, or '' if not found |
4140 | 4201 | */ |
4141 | 4202 | |
4203 | +/** |
|
4204 | + * @param string $iconFileName |
|
4205 | + */ |
|
4142 | 4206 | function _getIcon($iconFileName) |
4143 | 4207 | { |
4144 | 4208 | |
@@ -4163,7 +4227,7 @@ discard block |
||
4163 | 4227 | /** |
4164 | 4228 | * Function to grab the correct icon image for Studio |
4165 | 4229 | * @param string $iconFileName Name of the icon file |
4166 | - * @param string $altfilename Name of a fallback icon file (displayed if the imagefilename doesn't exist) |
|
4230 | + * @param string $altFileName Name of a fallback icon file (displayed if the imagefilename doesn't exist) |
|
4167 | 4231 | * @param string $width Width of image |
4168 | 4232 | * @param string $height Height of image |
4169 | 4233 | * @param string $align Alignment of image |
@@ -4188,7 +4252,6 @@ discard block |
||
4188 | 4252 | |
4189 | 4253 | /** |
4190 | 4254 | * Function to grab the correct icon image for Dashlets Dialog |
4191 | - * @param string $filename Location of the icon file |
|
4192 | 4255 | * @param string $module Name of the module to fall back onto if file does not exist |
4193 | 4256 | * @param string $width Width of image |
4194 | 4257 | * @param string $height Height of image |
@@ -4601,7 +4664,7 @@ discard block |
||
4601 | 4664 | * 5.5.1RC1 then return 5.5.1 |
4602 | 4665 | * |
4603 | 4666 | * @param string $version |
4604 | - * @return version |
|
4667 | + * @return string |
|
4605 | 4668 | */ |
4606 | 4669 | function getMajorMinorVersion($version){ |
4607 | 4670 | if(preg_match('/^([\d\.]+).*$/si', $version, $matches2)){ |
@@ -4751,6 +4814,9 @@ discard block |
||
4751 | 4814 | } |
4752 | 4815 | } |
4753 | 4816 | |
4817 | +/** |
|
4818 | + * @param string $field_name |
|
4819 | + */ |
|
4754 | 4820 | function order_beans($beans, $field_name) |
4755 | 4821 | { |
4756 | 4822 | //Since php 5.2 doesn't include closures, we must use a global to pass the order field to cmp_beans. |
@@ -4885,7 +4951,7 @@ discard block |
||
4885 | 4951 | * otherwise it return $file |
4886 | 4952 | * |
4887 | 4953 | * @param $file String of filename to check |
4888 | - * @return $file String of filename including custom directory if found |
|
4954 | + * @return string String of filename including custom directory if found |
|
4889 | 4955 | */ |
4890 | 4956 | function get_custom_file_if_exists($file) |
4891 | 4957 | { |
@@ -5037,7 +5103,7 @@ discard block |
||
5037 | 5103 | /** |
5038 | 5104 | * Gets the list of "*type_display*". |
5039 | 5105 | * |
5040 | - * @return array |
|
5106 | + * @return string[] |
|
5041 | 5107 | */ |
5042 | 5108 | function getTypeDisplayList() |
5043 | 5109 | { |
@@ -39,6 +39,10 @@ |
||
39 | 39 | ********************************************************************************/ |
40 | 40 | |
41 | 41 | |
42 | +/** |
|
43 | + * @param string $user_id |
|
44 | + * @param string $where |
|
45 | + */ |
|
42 | 46 | function build_related_list_by_user_id($bean, $user_id,$where) { |
43 | 47 | $bean_id_name = strtolower($bean->object_name).'_id'; |
44 | 48 |
@@ -85,6 +85,9 @@ discard block |
||
85 | 85 | * $eval - evals the generated string if true, note that the array name must be in the global space! |
86 | 86 | * @return : example - string $array_name['a']['b']['c'][.] = 'hello' |
87 | 87 | */ |
88 | +/** |
|
89 | + * @param string $array_name |
|
90 | + */ |
|
88 | 91 | function override_value_to_string_recursive($key_names, $array_name, $value, $eval=false){ |
89 | 92 | if ($eval) return eval( "\${$array_name}". override_recursive_helper($key_names, $array_name, $value)); |
90 | 93 | else return "\${$array_name}". override_recursive_helper($key_names, $array_name, $value); |
@@ -150,6 +153,7 @@ discard block |
||
150 | 153 | * @param array $array2, the array which |
151 | 154 | * @param array $allowEmpty, will return the value if it is empty in $array1 and not in $array2, |
152 | 155 | * otherwise empty values in $array1 are ignored. |
156 | + * @param string $array1 |
|
153 | 157 | * @return array containing the differences between the two arrays |
154 | 158 | */ |
155 | 159 | function deepArrayDiff($array1, $array2, $allowEmpty = false) { |
@@ -270,6 +274,9 @@ discard block |
||
270 | 274 | return $array->get($needle, $default); |
271 | 275 | } |
272 | 276 | |
277 | + /** |
|
278 | + * @param string $key |
|
279 | + */ |
|
273 | 280 | private function _getFromSource($key, $default) { |
274 | 281 | if (strpos($key, '.') === false) { |
275 | 282 | return isset($this[$key]) ? $this[$key] : $default; |
@@ -42,6 +42,7 @@ |
||
42 | 42 | |
43 | 43 | /** |
44 | 44 | * @deprecated use DBManager::convert() instead. |
45 | + * @param string $type |
|
45 | 46 | */ |
46 | 47 | function db_convert($string, $type, $additional_parameters=array(),$additional_parameters_oracle_only=array()) |
47 | 48 | { |
@@ -40,6 +40,10 @@ discard block |
||
40 | 40 | |
41 | 41 | require_once('include/Pear/Crypt_Blowfish/Blowfish.php'); |
42 | 42 | |
43 | +/** |
|
44 | + * @param string $key |
|
45 | + * @param string $data |
|
46 | + */ |
|
43 | 47 | function sugarEncode($key, $data){ |
44 | 48 | return base64_encode($data); |
45 | 49 | } |
@@ -84,6 +88,7 @@ discard block |
||
84 | 88 | * Uses blowfish to encrypt data and base 64 encodes it. It stores the iv as part of the data |
85 | 89 | * @param STRING key - key to base encoding off of |
86 | 90 | * @param STRING data - string to be encrypted and encoded |
91 | + * @param string $key |
|
87 | 92 | * @return string |
88 | 93 | */ |
89 | 94 | function blowfishEncode($key, $data){ |
@@ -96,6 +101,7 @@ discard block |
||
96 | 101 | * Uses blowfish to decode data assumes data has been base64 encoded with the iv stored as part of the data |
97 | 102 | * @param STRING key - key to base decoding off of |
98 | 103 | * @param STRING encoded base64 encoded blowfish encrypted data |
104 | + * @param string $key |
|
99 | 105 | * @return string |
100 | 106 | */ |
101 | 107 | function blowfishDecode($key, $encoded){ |
@@ -61,6 +61,9 @@ discard block |
||
61 | 61 | return( $appendpath.$path ); |
62 | 62 | } |
63 | 63 | |
64 | +/** |
|
65 | + * @param string $file |
|
66 | + */ |
|
64 | 67 | function create_cache_directory($file) |
65 | 68 | { |
66 | 69 | $paths = explode('/',$file); |
@@ -170,6 +173,9 @@ discard block |
||
170 | 173 | return( $write_to_file ); |
171 | 174 | } |
172 | 175 | |
176 | +/** |
|
177 | + * @param string $file |
|
178 | + */ |
|
173 | 179 | function create_custom_directory($file) |
174 | 180 | { |
175 | 181 | $paths = explode('/',$file); |
@@ -241,8 +247,8 @@ discard block |
||
241 | 247 | /** |
242 | 248 | * Function to compare two directory structures and return the items in path_a that didn't match in path_b |
243 | 249 | * |
244 | - * @param $path_a The path of the first root directory to scan - must end with '/' |
|
245 | - * @param $path_b The path of the second root directory to scan - must end with '/' |
|
250 | + * @param string $path_a The path of the first root directory to scan - must end with '/' |
|
251 | + * @param string $path_b The path of the second root directory to scan - must end with '/' |
|
246 | 252 | * @param $ignore_dirs array of filenames/directory names to ignore running md5 on - default 'cache' and 'upload' |
247 | 253 | * @result array containing all the md5s of everything in $path_a that didn't have a match in $path_b |
248 | 254 | */ |
@@ -374,7 +380,7 @@ discard block |
||
374 | 380 | * extension and returns a best guess mime content type. |
375 | 381 | * |
376 | 382 | * @param $filename String of filename to return mime content type |
377 | - * @return mime content type as String value (defaults to 'application/octet-stream' for filenames with extension, empty otherwise) |
|
383 | + * @return string content type as String value (defaults to 'application/octet-stream' for filenames with extension, empty otherwise) |
|
378 | 384 | * |
379 | 385 | */ |
380 | 386 | function get_mime_content_type_from_filename($filename) |
@@ -467,6 +473,9 @@ discard block |
||
467 | 473 | |
468 | 474 | } |
469 | 475 | */ |
476 | +/** |
|
477 | + * @param string $name |
|
478 | + */ |
|
470 | 479 | function cleanFileName($name) |
471 | 480 | { |
472 | 481 | return preg_replace('/[^\w-._]+/i', '', $name); |