Fix all phpdoc blocks (#345)

* Add a @since on a function

* Refresh phpdoc blocks

Using `@param (\$[a-zA-Z0-9_]+)\s\(([a-z]+)\)`

* Fix phpdoc blocks

* Fix typos and phpdoc mistakes

* More phpdoc block fixes

Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
This commit is contained in:
William Desportes 2021-03-28 12:55:50 +02:00 committed by GitHub
parent 03629b7c4e
commit 4f1d629d24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 1719 additions and 1710 deletions

View File

@ -35,10 +35,10 @@ class MC_TCPDF extends TCPDF {
/**
* Print chapter
* @param $num (int) chapter number
* @param $title (string) chapter title
* @param $file (string) name of the file containing the chapter body
* @param $mode (boolean) if true the chapter body is in HTML, otherwise in simple text.
* @param int $num chapter number
* @param string $title chapter title
* @param string $file name of the file containing the chapter body
* @param boolean $mode if true the chapter body is in HTML, otherwise in simple text.
* @public
*/
public function PrintChapter($num, $title, $file, $mode=false) {
@ -56,8 +56,8 @@ class MC_TCPDF extends TCPDF {
/**
* Set chapter title
* @param $num (int) chapter number
* @param $title (string) chapter title
* @param int $num chapter number
* @param string $title chapter title
* @public
*/
public function ChapterTitle($num, $title) {
@ -69,8 +69,8 @@ class MC_TCPDF extends TCPDF {
/**
* Print chapter body
* @param $file (string) name of the file containing the chapter body
* @param $mode (boolean) if true the chapter body is in HTML, otherwise in simple text.
* @param string $file name of the file containing the chapter body
* @param boolean $mode if true the chapter body is in HTML, otherwise in simple text.
* @public
*/
public function ChapterBody($file, $mode=false) {

View File

@ -229,7 +229,7 @@ class Datamatrix {
/**
* This is the class constructor.
* Creates a datamatrix object
* @param $code (string) Code to represent using Datamatrix.
* @param string $code Code to represent using Datamatrix.
* @public
*/
public function __construct($code) {
@ -355,11 +355,11 @@ class Datamatrix {
/**
* Product of two numbers in a Power-of-Two Galois Field
* @param $a (int) first number to multiply.
* @param $b (int) second number to multiply.
* @param $log (array) Log table.
* @param $alog (array) Anti-Log table.
* @param $gf (array) Number of Factors of the Reed-Solomon polynomial.
* @param int $a first number to multiply.
* @param int $b second number to multiply.
* @param array $log Log table.
* @param array $alog Anti-Log table.
* @param array $gf Number of Factors of the Reed-Solomon polynomial.
* @return int product
* @protected
*/
@ -372,12 +372,12 @@ class Datamatrix {
/**
* Add error correction codewords to data codewords array (ANNEX E).
* @param $wd (array) Array of datacodewords.
* @param $nb (int) Number of blocks.
* @param $nd (int) Number of data codewords per block.
* @param $nc (int) Number of correction codewords per block.
* @param $gf (int) numner of fields on log/antilog table (power of 2).
* @param $pp (int) The value of its prime modulus polynomial (301 for ECC200).
* @param array $wd Array of datacodewords.
* @param int $nb Number of blocks.
* @param int $nd Number of data codewords per block.
* @param int $nc Number of correction codewords per block.
* @param int $gf numner of fields on log/antilog table (power of 2).
* @param int $pp The value of its prime modulus polynomial (301 for ECC200).
* @return array data codewords + error codewords
* @protected
*/
@ -438,9 +438,9 @@ class Datamatrix {
/**
* Return the 253-state codeword
* @param $cwpad (int) Pad codeword.
* @param $cwpos (int) Number of data codewords from the beginning of encoded data.
* @return pad codeword
* @param int $cwpad Pad codeword.
* @param int $cwpos Number of data codewords from the beginning of encoded data.
* @return int pad codeword
* @protected
*/
protected function get253StateCodeword($cwpad, $cwpos) {
@ -453,9 +453,9 @@ class Datamatrix {
/**
* Return the 255-state codeword
* @param $cwpad (int) Pad codeword.
* @param $cwpos (int) Number of data codewords from the beginning of encoded data.
* @return pad codeword
* @param int $cwpad Pad codeword.
* @param int $cwpos Number of data codewords from the beginning of encoded data.
* @return int pad codeword
* @protected
*/
protected function get255StateCodeword($cwpad, $cwpos) {
@ -468,8 +468,8 @@ class Datamatrix {
/**
* Returns true if the char belongs to the selected mode
* @param $chr (int) Character (byte) to check.
* @param $mode (int) Current encoding mode.
* @param int $chr Character (byte) to check.
* @param int $mode Current encoding mode.
* @return boolean true if the char is of the selected mode.
* @protected
*/
@ -514,9 +514,9 @@ class Datamatrix {
/**
* The look-ahead test scans the data to be encoded to find the best mode (Annex P - steps from J to S).
* @param $data (string) data to encode
* @param $pos (int) current position
* @param $mode (int) current encoding mode
* @param string $data data to encode
* @param int $pos current position
* @param int $mode current encoding mode
* @return int encoding mode
* @protected
*/
@ -646,8 +646,8 @@ class Datamatrix {
/**
* Get the switching codeword to a new encoding mode (latch codeword)
* @param $mode (int) New encoding mode.
* @return (int) Switch codeword.
* @param int $mode New encoding mode.
* @return int Switch codeword.
* @protected
*/
protected function getSwitchEncodingCodeword($mode) {
@ -685,7 +685,7 @@ class Datamatrix {
/**
* Choose the minimum matrix size and return the max number of data codewords.
* @param $numcw (int) Number of current codewords.
* @param int $numcw Number of current codewords.
* @return number of data codewords in matrix
* @protected
*/
@ -700,7 +700,7 @@ class Datamatrix {
/**
* Get high level encoding using the minimum symbol data characters for ECC 200
* @param $data (string) data to encode
* @param string $data data to encode
* @return array of codewords
* @protected
*/
@ -970,13 +970,13 @@ class Datamatrix {
/**
* Places "chr+bit" with appropriate wrapping within array[].
* (Annex F - ECC 200 symbol character placement)
* @param $marr (array) Array of symbols.
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param $row (int) Row number.
* @param $col (int) Column number.
* @param $chr (int) Char byte.
* @param $bit (int) Bit.
* @param array $marr Array of symbols.
* @param int $nrow Number of rows.
* @param int $ncol Number of columns.
* @param int $row Row number.
* @param int $col Column number.
* @param int $chr Char byte.
* @param int $bit Bit.
* @return array
* @protected
*/
@ -996,12 +996,12 @@ class Datamatrix {
/**
* Places the 8 bits of a utah-shaped symbol character.
* (Annex F - ECC 200 symbol character placement)
* @param $marr (array) Array of symbols.
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param $row (int) Row number.
* @param $col (int) Column number.
* @param $chr (int) Char byte.
* @param array $marr Array of symbols.
* @param int $nrow Number of rows.
* @param int $ncol Number of columns.
* @param int $row Row number.
* @param int $col Column number.
* @param int $chr Char byte.
* @return array
* @protected
*/
@ -1020,10 +1020,10 @@ class Datamatrix {
/**
* Places the 8 bits of the first special corner case.
* (Annex F - ECC 200 symbol character placement)
* @param $marr (array) Array of symbols.
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param $chr (int) Char byte.
* @param array $marr Array of symbols.
* @param int $nrow Number of rows.
* @param int $ncol Number of columns.
* @param int $chr Char byte.
* @return array
* @protected
*/
@ -1042,10 +1042,10 @@ class Datamatrix {
/**
* Places the 8 bits of the second special corner case.
* (Annex F - ECC 200 symbol character placement)
* @param $marr (array) Array of symbols.
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param $chr (int) Char byte.
* @param array $marr Array of symbols.
* @param int $nrow Number of rows.
* @param int $ncol Number of columns.
* @param int $chr Char byte.
* @return array
* @protected
*/
@ -1064,10 +1064,10 @@ class Datamatrix {
/**
* Places the 8 bits of the third special corner case.
* (Annex F - ECC 200 symbol character placement)
* @param $marr (array) Array of symbols.
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param $chr (int) Char byte.
* @param array $marr Array of symbols.
* @param int $nrow Number of rows.
* @param int $ncol Number of columns.
* @param int $chr Char byte.
* @return array
* @protected
*/
@ -1086,10 +1086,10 @@ class Datamatrix {
/**
* Places the 8 bits of the fourth special corner case.
* (Annex F - ECC 200 symbol character placement)
* @param $marr (array) Array of symbols.
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param $chr (int) Char byte.
* @param array $marr Array of symbols.
* @param int $nrow Number of rows.
* @param int $ncol Number of columns.
* @param int $chr Char byte.
* @return array
* @protected
*/
@ -1108,8 +1108,8 @@ class Datamatrix {
/**
* Build a placement map.
* (Annex F - ECC 200 symbol character placement)
* @param $nrow (int) Number of rows.
* @param $ncol (int) Number of columns.
* @param int $nrow Number of rows.
* @param int $ncol Number of columns.
* @return array
* @protected
*/

View File

@ -523,10 +523,10 @@ class PDF417 {
/**
* This is the class constructor.
* Creates a PDF417 object
* @param $code (string) code to represent using PDF417
* @param $ecl (int) error correction level (0-8); default -1 = automatic correction level
* @param $aspectratio (float) the width to height of the symbol (excluding quiet zones)
* @param $macro (array) information for macro block
* @param string $code code to represent using PDF417
* @param int $ecl error correction level (0-8); default -1 = automatic correction level
* @param float $aspectratio the width to height of the symbol (excluding quiet zones)
* @param array $macro information for macro block
* @public
*/
public function __construct($code, $ecl=-1, $aspectratio=2, $macro=array()) {
@ -734,8 +734,8 @@ class PDF417 {
/**
* Returns the error correction level (0-8) to be used
* @param $ecl (int) error correction level
* @param $numcw (int) number of data codewords
* @param int $ecl error correction level
* @param int $numcw number of data codewords
* @return int error correction level
* @protected
*/
@ -772,8 +772,8 @@ class PDF417 {
/**
* Returns the error correction codewords
* @param $cw (array) array of codewords including Symbol Length Descriptor and pad
* @param $ecl (int) error correction level 0-8
* @param array $cw array of codewords including Symbol Length Descriptor and pad
* @param int $ecl error correction level 0-8
* @return array of error correction codewords
* @protected
*/
@ -809,8 +809,8 @@ class PDF417 {
/**
* Create array of sequences from input
* @param $code (string) code
* @return bidimensional array containing characters and classification
* @param string $code code
* @return array bi-dimensional array containing characters and classification
* @protected
*/
protected function getInputSequences($code) {
@ -864,9 +864,9 @@ class PDF417 {
/**
* Compact data by mode.
* @param $mode (int) compaction mode number
* @param $code (string) data to compact
* @param $addmode (boolean) if true add the mode codeword at first position
* @param int $mode compaction mode number
* @param string $code data to compact
* @param boolean $addmode if true add the mode codeword at first position
* @return array of codewords
* @protected
*/

View File

@ -253,8 +253,8 @@ if (!defined('QRCODEDEFS')) {
if (!function_exists('str_split')) {
/**
* Convert a string to an array (needed for PHP4 compatibility)
* @param $string (string) The input string.
* @param $split_length (int) Maximum length of the chunk.
* @param string $string The input string.
* @param int $split_length Maximum length of the chunk.
* @return If the optional split_length parameter is specified, the returned array will be broken down into chunks with each being split_length in length, otherwise each chunk will be one character in length. FALSE is returned if split_length is less than 1. If the split_length length exceeds the length of string , the entire string is returned as the first (and only) array element.
*/
function str_split($string, $split_length=1) {
@ -631,8 +631,8 @@ class QRcode {
/**
* This is the class constructor.
* Creates a QRcode object
* @param $code (string) code to represent using QRcode
* @param $eclevel (string) error level: <ul><li>L : About 7% or less errors can be corrected.</li><li>M : About 15% or less errors can be corrected.</li><li>Q : About 25% or less errors can be corrected.</li><li>H : About 30% or less errors can be corrected.</li></ul>
* @param string $code code to represent using QRcode
* @param string $eclevel error level: <ul><li>L : About 7% or less errors can be corrected.</li><li>M : About 15% or less errors can be corrected.</li><li>Q : About 25% or less errors can be corrected.</li><li>H : About 30% or less errors can be corrected.</li></ul>
* @public
* @since 1.0.000
*/
@ -683,7 +683,7 @@ class QRcode {
/**
* Convert the frame in binary form
* @param $frame (array) array to binarize
* @param array $frame array to binarize
* @return array frame in binary form
*/
protected function binarize($frame) {
@ -699,7 +699,7 @@ class QRcode {
/**
* Encode the input string to QR code
* @param $string (string) input string to encode
* @param string $string input string to encode
*/
protected function encodeString($string) {
$this->dataStr = $string;
@ -715,7 +715,7 @@ class QRcode {
/**
* Encode mask
* @param $mask (int) masking mode
* @param int $mask masking mode
*/
protected function encodeMask($mask) {
$spec = array(0, 0, 0, 0, 0);
@ -780,8 +780,8 @@ class QRcode {
/**
* Set frame value at specified position
* @param $at (array) x,y position
* @param $val (int) value of the character to set
* @param array $at x,y position
* @param int $val value of the character to set
*/
protected function setFrameAt($at, $val) {
$this->frame[$at['y']][$at['x']] = chr($val);
@ -789,7 +789,7 @@ class QRcode {
/**
* Get frame value at specified position
* @param $at (array) x,y position
* @param array $at x,y position
* @return value at specified position
*/
protected function getFrameAt($at) {
@ -853,8 +853,8 @@ class QRcode {
/**
* Initialize code.
* @param $spec (array) array of ECC specification
* @return 0 in case of success, -1 in case of error
* @param array $spec array of ECC specification
* @return int 0 in case of success, -1 in case of error
*/
protected function init($spec) {
$dl = $this->rsDataCodes1($spec);
@ -932,10 +932,10 @@ class QRcode {
/**
* Write Format Information on frame and returns the number of black bits
* @param $width (int) frame width
* @param $frame (array) frame
* @param $mask (array) masking mode
* @param $level (int) error correction level
* @param int $width frame width
* @param array $frame frame
* @param array $mask masking mode
* @param int $level error correction level
* @return int blacks
*/
protected function writeFormatInformation($width, &$frame, $mask, $level) {
@ -976,8 +976,8 @@ class QRcode {
/**
* mask0
* @param $x (int) X position
* @param $y (int) Y position
* @param int $x X position
* @param int $y Y position
* @return int mask
*/
protected function mask0($x, $y) {
@ -986,8 +986,8 @@ class QRcode {
/**
* mask1
* @param $x (int) X position
* @param $y (int) Y position
* @param int $x X position
* @param int $y Y position
* @return int mask
*/
protected function mask1($x, $y) {
@ -996,8 +996,8 @@ class QRcode {
/**
* mask2
* @param $x (int) X position
* @param $y (int) Y position
* @param int $x X position
* @param int $y Y position
* @return int mask
*/
protected function mask2($x, $y) {
@ -1006,8 +1006,8 @@ class QRcode {
/**
* mask3
* @param $x (int) X position
* @param $y (int) Y position
* @param int $x X position
* @param int $y Y position
* @return int mask
*/
protected function mask3($x, $y) {
@ -1016,8 +1016,8 @@ class QRcode {
/**
* mask4
* @param $x (int) X position
* @param $y (int) Y position
* @param int $x X position
* @param int $y Y position
* @return int mask
*/
protected function mask4($x, $y) {
@ -1026,8 +1026,8 @@ class QRcode {
/**
* mask5
* @param $x (int) X position
* @param $y (int) Y position
* @param int $x X position
* @param int $y Y position
* @return int mask
*/
protected function mask5($x, $y) {
@ -1036,8 +1036,8 @@ class QRcode {
/**
* mask6
* @param $x (int) X position
* @param $y (int) Y position
* @param int $x X position
* @param int $y Y position
* @return int mask
*/
protected function mask6($x, $y) {
@ -1046,8 +1046,8 @@ class QRcode {
/**
* mask7
* @param $x (int) X position
* @param $y (int) Y position
* @param int $x X position
* @param int $y Y position
* @return int mask
*/
protected function mask7($x, $y) {
@ -1056,9 +1056,9 @@ class QRcode {
/**
* Return bitmask
* @param $maskNo (int) mask number
* @param $width (int) width
* @param $frame (array) frame
* @param int $maskNo mask number
* @param int $width width
* @param array $frame frame
* @return array bitmask
*/
protected function generateMaskNo($maskNo, $width, $frame) {
@ -1078,11 +1078,11 @@ class QRcode {
/**
* makeMaskNo
* @param $maskNo (int)
* @param $width (int)
* @param $s (int)
* @param $d (int)
* @param $maskGenOnly (boolean)
* @param int $maskNo
* @param int $width
* @param int $s
* @param int $d
* @param boolean $maskGenOnly
* @return int b
*/
protected function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly=false) {
@ -1106,10 +1106,10 @@ class QRcode {
/**
* makeMask
* @param $width (int)
* @param $frame (array)
* @param $maskNo (int)
* @param $level (int)
* @param int $width
* @param array $frame
* @param int $maskNo
* @param int $level
* @return array mask
*/
protected function makeMask($width, $frame, $maskNo, $level) {
@ -1121,7 +1121,7 @@ class QRcode {
/**
* calcN1N3
* @param $length (int)
* @param int $length
* @return int demerit
*/
protected function calcN1N3($length) {
@ -1151,8 +1151,8 @@ class QRcode {
/**
* evaluateSymbol
* @param $width (int)
* @param $frame (array)
* @param int $width
* @param array $frame
* @return int demerit
*/
protected function evaluateSymbol($width, $frame) {
@ -1212,9 +1212,9 @@ class QRcode {
/**
* mask
* @param $width (int)
* @param $frame (array)
* @param $level (int)
* @param int $width
* @param array $frame
* @param int $level
* @return array best mask
*/
protected function mask($width, $frame, $level) {
@ -1255,8 +1255,8 @@ class QRcode {
/**
* Return true if the character at specified position is a number
* @param $str (string) string
* @param $pos (int) characted position
* @param string $str string
* @param int $pos characted position
* @return boolean true of false
*/
protected function isdigitat($str, $pos) {
@ -1268,8 +1268,8 @@ class QRcode {
/**
* Return true if the character at specified position is an alphanumeric character
* @param $str (string) string
* @param $pos (int) characted position
* @param string $str string
* @param int $pos characted position
* @return boolean true of false
*/
protected function isalnumat($str, $pos) {
@ -1281,7 +1281,7 @@ class QRcode {
/**
* identifyMode
* @param $pos (int)
* @param int $pos
* @return int mode
*/
protected function identifyMode($pos) {
@ -1441,7 +1441,7 @@ class QRcode {
/**
* splitString
* @return (int)
* @return int
*/
protected function splitString() {
while (strlen($this->dataStr) > 0) {
@ -1505,10 +1505,10 @@ class QRcode {
/**
* newInputItem
* @param $mode (int)
* @param $size (int)
* @param $data (array)
* @param $bstream (array)
* @param int $mode
* @param int $size
* @param array $data
* @param array $bstream
* @return array input item
*/
protected function newInputItem($mode, $size, $data, $bstream=null) {
@ -1529,8 +1529,8 @@ class QRcode {
/**
* encodeModeNum
* @param $inputitem (array)
* @param $version (int)
* @param array $inputitem
* @param int $version
* @return array input item
*/
protected function encodeModeNum($inputitem, $version) {
@ -1558,8 +1558,8 @@ class QRcode {
/**
* encodeModeAn
* @param $inputitem (array)
* @param $version (int)
* @param array $inputitem
* @param int $version
* @return array input item
*/
protected function encodeModeAn($inputitem, $version) {
@ -1581,8 +1581,8 @@ class QRcode {
/**
* encodeMode8
* @param $inputitem (array)
* @param $version (int)
* @param array $inputitem
* @param int $version
* @return array input item
*/
protected function encodeMode8($inputitem, $version) {
@ -1597,8 +1597,8 @@ class QRcode {
/**
* encodeModeKanji
* @param $inputitem (array)
* @param $version (int)
* @param array $inputitem
* @param int $version
* @return array input item
*/
protected function encodeModeKanji($inputitem, $version) {
@ -1621,7 +1621,7 @@ class QRcode {
/**
* encodeModeStructure
* @param $inputitem (array)
* @param array $inputitem
* @return array input item
*/
protected function encodeModeStructure($inputitem) {
@ -1635,8 +1635,8 @@ class QRcode {
/**
* encodeBitStream
* @param $inputitem (array)
* @param $version (int)
* @param array $inputitem
* @param int $version
* @return array input item
*/
protected function encodeBitStream($inputitem, $version) {
@ -1687,11 +1687,11 @@ class QRcode {
/**
* Append data to an input object.
* The data is copied and appended to the input object.
* @param $items (arrray) input items
* @param $mode (int) encoding mode.
* @param $size (int) size of data (byte).
* @param $data (array) array of input data.
* @return items
* @param array $items input items
* @param int $mode encoding mode.
* @param int $size size of data (byte).
* @param array $data array of input data.
* @return array items
*
*/
protected function appendNewInputItem($items, $mode, $size, $data) {
@ -1704,10 +1704,10 @@ class QRcode {
/**
* insertStructuredAppendHeader
* @param $items (array)
* @param $size (int)
* @param $index (int)
* @param $parity (int)
* @param array $items
* @param int $size
* @param int $index
* @param int $parity
* @return array items
*/
protected function insertStructuredAppendHeader($items, $size, $index, $parity) {
@ -1725,7 +1725,7 @@ class QRcode {
/**
* calcParity
* @param $items (array)
* @param array $items
* @return int parity
*/
protected function calcParity($items) {
@ -1742,8 +1742,8 @@ class QRcode {
/**
* checkModeNum
* @param $size (int)
* @param $data (array)
* @param int $size
* @param array $data
* @return boolean true or false
*/
protected function checkModeNum($size, $data) {
@ -1756,9 +1756,9 @@ class QRcode {
}
/**
* Look up the alphabet-numeric convesion table (see JIS X0510:2004, pp.19).
* @param $c (int) character value
* @return value
* Look up the alphabet-numeric conversion table (see JIS X0510:2004, pp.19).
* @param int $c character value
* @return int value
*/
protected function lookAnTable($c) {
return (($c > 127)?-1:$this->anTable[$c]);
@ -1766,8 +1766,8 @@ class QRcode {
/**
* checkModeAn
* @param $size (int)
* @param $data (array)
* @param int $size
* @param array $data
* @return boolean true or false
*/
protected function checkModeAn($size, $data) {
@ -1781,7 +1781,7 @@ class QRcode {
/**
* estimateBitsModeNum
* @param $size (int)
* @param int $size
* @return int number of bits
*/
protected function estimateBitsModeNum($size) {
@ -1802,7 +1802,7 @@ class QRcode {
/**
* estimateBitsModeAn
* @param $size (int)
* @param int $size
* @return int number of bits
*/
protected function estimateBitsModeAn($size) {
@ -1815,7 +1815,7 @@ class QRcode {
/**
* estimateBitsMode8
* @param $size (int)
* @param int $size
* @return int number of bits
*/
protected function estimateBitsMode8($size) {
@ -1824,7 +1824,7 @@ class QRcode {
/**
* estimateBitsModeKanji
* @param $size (int)
* @param int $size
* @return int number of bits
*/
protected function estimateBitsModeKanji($size) {
@ -1833,8 +1833,8 @@ class QRcode {
/**
* checkModeKanji
* @param $size (int)
* @param $data (array)
* @param int $size
* @param array $data
* @return boolean true or false
*/
protected function checkModeKanji($size, $data) {
@ -1852,9 +1852,9 @@ class QRcode {
/**
* Validate the input data.
* @param $mode (int) encoding mode.
* @param $size (int) size of data (byte).
* @param $data (array) data to validate
* @param int $mode encoding mode.
* @param int $size size of data (byte).
* @param array $data data to validate
* @return boolean true in case of valid data, false otherwise
*/
protected function check($mode, $size, $data) {
@ -1886,8 +1886,8 @@ class QRcode {
/**
* estimateBitStreamSize
* @param $items (array)
* @param $version (int)
* @param array $items
* @param int $version
* @return int bits
*/
protected function estimateBitStreamSize($items, $version) {
@ -1930,7 +1930,7 @@ class QRcode {
/**
* estimateVersion
* @param $items (array)
* @param array $items
* @return int version
*/
protected function estimateVersion($items) {
@ -1949,9 +1949,9 @@ class QRcode {
/**
* lengthOfCode
* @param $mode (int)
* @param $version (int)
* @param $bits (int)
* @param int $mode
* @param int $version
* @param int $bits
* @return int size
*/
protected function lengthOfCode($mode, $version, $bits) {
@ -2006,7 +2006,7 @@ class QRcode {
/**
* createBitStream
* @param $items (array)
* @param array $items
* @return array of items and total bits
*/
protected function createBitStream($items) {
@ -2021,7 +2021,7 @@ class QRcode {
/**
* convertData
* @param $items (array)
* @param array $items
* @return array items
*/
protected function convertData($items) {
@ -2050,7 +2050,7 @@ class QRcode {
/**
* Append Padding Bit to bitstream
* @param $bstream (array)
* @param array $bstream
* @return array bitstream
*/
protected function appendPaddingBit($bstream) {
@ -2083,7 +2083,7 @@ class QRcode {
/**
* mergeBitStream
* @param $items (array) items
* @param array $items items
* @return array bitstream
*/
protected function mergeBitStream($items) {
@ -2100,7 +2100,7 @@ class QRcode {
/**
* Returns a stream of bits.
* @param $items (int)
* @param int $items
* @return array padded merged byte stream
*/
protected function getBitStream($items) {
@ -2110,7 +2110,7 @@ class QRcode {
/**
* Pack all bit streams padding bits into a byte array.
* @param $items (int)
* @param int $items
* @return array padded merged byte stream
*/
protected function getByteStream($items) {
@ -2124,7 +2124,7 @@ class QRcode {
/**
* Return an array with zeros
* @param $setLength (int) array size
* @param int $setLength array size
* @return array
*/
protected function allocate($setLength) {
@ -2133,8 +2133,8 @@ class QRcode {
/**
* Return new bitstream from number
* @param $bits (int) number of bits
* @param $num (int) number
* @param int $bits number of bits
* @param int $num number
* @return array bitstream
*/
protected function newFromNum($bits, $num) {
@ -2153,8 +2153,8 @@ class QRcode {
/**
* Return new bitstream from bytes
* @param $size (int) size
* @param $data (array) bytes
* @param int $size size
* @param array $data bytes
* @return array bitstream
*/
protected function newFromBytes($size, $data) {
@ -2177,8 +2177,8 @@ class QRcode {
/**
* Append one bitstream to another
* @param $bitstream (array) original bitstream
* @param $append (array) bitstream to append
* @param array $bitstream original bitstream
* @param array $append bitstream to append
* @return array bitstream
*/
protected function appendBitstream($bitstream, $append) {
@ -2193,9 +2193,9 @@ class QRcode {
/**
* Append one bitstream created from number to another
* @param $bitstream (array) original bitstream
* @param $bits (int) number of bits
* @param $num (int) number
* @param array $bitstream original bitstream
* @param int $bits number of bits
* @param int $num number
* @return array bitstream
*/
protected function appendNum($bitstream, $bits, $num) {
@ -2208,9 +2208,9 @@ class QRcode {
/**
* Append one bitstream created from bytes to another
* @param $bitstream (array) original bitstream
* @param $size (int) size
* @param $data (array) bytes
* @param array $bitstream original bitstream
* @param int $size size
* @param array $data bytes
* @return array bitstream
*/
protected function appendBytes($bitstream, $size, $data) {
@ -2223,7 +2223,7 @@ class QRcode {
/**
* Convert bitstream to bytes
* @param $bstream (array) original bitstream
* @param array $bstream original bitstream
* @return array of bytes
*/
protected function bitstreamToByte($bstream) {
@ -2264,11 +2264,11 @@ class QRcode {
/**
* Replace a value on the array at the specified position
* @param $srctab (array)
* @param $x (int) X position
* @param $y (int) Y position
* @param $repl (string) value to replace
* @param $replLen (int) length of the repl string
* @param array $srctab
* @param int $x X position
* @param int $y Y position
* @param string $repl value to replace
* @param int $replLen length of the repl string
* @return array srctab
*/
protected function qrstrset($srctab, $x, $y, $repl, $replLen=false) {
@ -2278,8 +2278,8 @@ class QRcode {
/**
* Return maximum data code length (bytes) for the version.
* @param $version (int) version
* @param $level (int) error correction level
* @param int $version version
* @param int $level error correction level
* @return int maximum size (bytes)
*/
protected function getDataLength($version, $level) {
@ -2288,8 +2288,8 @@ class QRcode {
/**
* Return maximum error correction code length (bytes) for the version.
* @param $version (int) version
* @param $level (int) error correction level
* @param int $version version
* @param int $level error correction level
* @return int ECC size (bytes)
*/
protected function getECCLength($version, $level){
@ -2298,7 +2298,7 @@ class QRcode {
/**
* Return the width of the symbol for the version.
* @param $version (int) version
* @param int $version version
* @return int width
*/
protected function getWidth($version) {
@ -2307,7 +2307,7 @@ class QRcode {
/**
* Return the numer of remainder bits.
* @param $version (int) version
* @param int $version version
* @return int number of remainder bits
*/
protected function getRemainder($version) {
@ -2316,8 +2316,8 @@ class QRcode {
/**
* Return a version number that satisfies the input code length.
* @param $size (int) input code length (bytes)
* @param $level (int) error correction level
* @param int $size input code length (bytes)
* @param int $level error correction level
* @return int version number
*/
protected function getMinimumVersion($size, $level) {
@ -2333,8 +2333,8 @@ class QRcode {
/**
* Return the size of length indicator for the mode and version.
* @param $mode (int) encoding mode
* @param $version (int) version
* @param int $mode encoding mode
* @param int $version version
* @return int the size of the appropriate length indicator (bits).
*/
protected function lengthIndicator($mode, $version) {
@ -2353,8 +2353,8 @@ class QRcode {
/**
* Return the maximum length for the mode and version.
* @param $mode (int) encoding mode
* @param $version (int) version
* @param int $mode encoding mode
* @param int $version version
* @return int the maximum length (bytes)
*/
protected function maximumWords($mode, $version) {
@ -2378,9 +2378,9 @@ class QRcode {
/**
* Return an array of ECC specification.
* @param $version (int) version
* @param $level (int) error correction level
* @param $spec (array) an array of ECC specification contains as following: {# of type1 blocks, # of data code, # of ecc code, # of type2 blocks, # of data code}
* @param int $version version
* @param int $level error correction level
* @param array $spec an array of ECC specification contains as following: {# of type1 blocks, # of data code, # of ecc code, # of type2 blocks, # of data code}
* @return array spec
*/
protected function getEccSpec($version, $level, $spec) {
@ -2409,9 +2409,9 @@ class QRcode {
/**
* Put an alignment marker.
* @param $frame (array) frame
* @param $ox (int) X center coordinate of the pattern
* @param $oy (int) Y center coordinate of the pattern
* @param array $frame frame
* @param int $ox X center coordinate of the pattern
* @param int $oy Y center coordinate of the pattern
* @return array frame
*/
protected function putAlignmentMarker($frame, $ox, $oy) {
@ -2432,9 +2432,9 @@ class QRcode {
/**
* Put an alignment pattern.
* @param $version (int) version
* @param $frame (array) frame
* @param $width (int) width
* @param int $version version
* @param array $frame frame
* @param int $width width
* @return array frame
*/
protected function putAlignmentPattern($version, $frame, $width) {
@ -2474,7 +2474,7 @@ class QRcode {
/**
* Return BCH encoded version information pattern that is used for the symbol of version 7 or greater. Use lower 18 bits.
* @param $version (int) version
* @param int $version version
* @return BCH encoded version information pattern
*/
protected function getVersionPattern($version) {
@ -2486,8 +2486,8 @@ class QRcode {
/**
* Return BCH encoded format information pattern.
* @param $mask (array)
* @param $level (int) error correction level
* @param array $mask
* @param int $level error correction level
* @return BCH encoded format information pattern
*/
protected function getFormatInfo($mask, $level) {
@ -2502,9 +2502,9 @@ class QRcode {
/**
* Put a finder pattern.
* @param $frame (array) frame
* @param $ox (int) X center coordinate of the pattern
* @param $oy (int) Y center coordinate of the pattern
* @param array $frame frame
* @param int $ox X center coordinate of the pattern
* @param int $oy Y center coordinate of the pattern
* @return array frame
*/
protected function putFinderPattern($frame, $ox, $oy) {
@ -2525,7 +2525,7 @@ class QRcode {
/**
* Return a copy of initialized frame.
* @param $version (int) version
* @param int $version version
* @return Array of unsigned char.
*/
protected function createFrame($version) {
@ -2590,7 +2590,7 @@ class QRcode {
/**
* Set new frame for the specified version.
* @param $version (int) version
* @param int $version version
* @return Array of unsigned char.
*/
protected function newFrame($version) {
@ -2608,7 +2608,7 @@ class QRcode {
/**
* Return block number 0
* @param $spec (array)
* @param array $spec
* @return int value
*/
protected function rsBlockNum($spec) {
@ -2617,7 +2617,7 @@ class QRcode {
/**
* Return block number 1
* @param $spec (array)
* @param array $spec
* @return int value
*/
protected function rsBlockNum1($spec) {
@ -2626,7 +2626,7 @@ class QRcode {
/**
* Return data codes 1
* @param $spec (array)
* @param array $spec
* @return int value
*/
protected function rsDataCodes1($spec) {
@ -2635,7 +2635,7 @@ class QRcode {
/**
* Return ecc codes 1
* @param $spec (array)
* @param array $spec
* @return int value
*/
protected function rsEccCodes1($spec) {
@ -2644,7 +2644,7 @@ class QRcode {
/**
* Return block number 2
* @param $spec (array)
* @param array $spec
* @return int value
*/
protected function rsBlockNum2($spec) {
@ -2653,7 +2653,7 @@ class QRcode {
/**
* Return data codes 2
* @param $spec (array)
* @param array $spec
* @return int value
*/
protected function rsDataCodes2($spec) {
@ -2662,7 +2662,7 @@ class QRcode {
/**
* Return ecc codes 2
* @param $spec (array)
* @param array $spec
* @return int value
*/
protected function rsEccCodes2($spec) {
@ -2671,7 +2671,7 @@ class QRcode {
/**
* Return data length
* @param $spec (array)
* @param array $spec
* @return int value
*/
protected function rsDataLength($spec) {
@ -2680,7 +2680,7 @@ class QRcode {
/**
* Return ecc length
* @param $spec (array)
* @param array $spec
* @return int value
*/
protected function rsEccLength($spec) {
@ -2693,12 +2693,12 @@ class QRcode {
/**
* Initialize a Reed-Solomon codec and add it to existing rsitems
* @param $symsize (int) symbol size, bits
* @param $gfpoly (int) Field generator polynomial coefficients
* @param $fcr (int) first root of RS code generator polynomial, index form
* @param $prim (int) primitive element to generate polynomial roots
* @param $nroots (int) RS code generator polynomial degree (number of roots)
* @param $pad (int) padding bytes at front of shortened block
* @param int $symsize symbol size, bits
* @param int $gfpoly Field generator polynomial coefficients
* @param int $fcr first root of RS code generator polynomial, index form
* @param int $prim primitive element to generate polynomial roots
* @param int $nroots RS code generator polynomial degree (number of roots)
* @param int $pad padding bytes at front of shortened block
* @return array Array of RS values:<ul><li>mm = Bits per symbol;</li><li>nn = Symbols per block;</li><li>alpha_to = log lookup table array;</li><li>index_of = Antilog lookup table array;</li><li>genpoly = Generator polynomial array;</li><li>nroots = Number of generator;</li><li>roots = number of parity symbols;</li><li>fcr = First consecutive root, index form;</li><li>prim = Primitive element, index form;</li><li>iprim = prim-th root of 1, index form;</li><li>pad = Padding bytes in shortened block;</li><li>gfpoly</ul>.
*/
protected function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) {
@ -2720,8 +2720,8 @@ class QRcode {
/**
* modnn
* @param $rs (array) RS values
* @param $x (int) X position
* @param array $rs RS values
* @param int $x X position
* @return int X osition
*/
protected function modnn($rs, $x) {
@ -2734,12 +2734,12 @@ class QRcode {
/**
* Initialize a Reed-Solomon codec and returns an array of values.
* @param $symsize (int) symbol size, bits
* @param $gfpoly (int) Field generator polynomial coefficients
* @param $fcr (int) first root of RS code generator polynomial, index form
* @param $prim (int) primitive element to generate polynomial roots
* @param $nroots (int) RS code generator polynomial degree (number of roots)
* @param $pad (int) padding bytes at front of shortened block
* @param int $symsize symbol size, bits
* @param int $gfpoly Field generator polynomial coefficients
* @param int $fcr first root of RS code generator polynomial, index form
* @param int $prim primitive element to generate polynomial roots
* @param int $nroots RS code generator polynomial degree (number of roots)
* @param int $pad padding bytes at front of shortened block
* @return array Array of RS values:<ul><li>mm = Bits per symbol;</li><li>nn = Symbols per block;</li><li>alpha_to = log lookup table array;</li><li>index_of = Antilog lookup table array;</li><li>genpoly = Generator polynomial array;</li><li>nroots = Number of generator;</li><li>roots = number of parity symbols;</li><li>fcr = First consecutive root, index form;</li><li>prim = Primitive element, index form;</li><li>iprim = prim-th root of 1, index form;</li><li>pad = Padding bytes in shortened block;</li><li>gfpoly</ul>.
*/
protected function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) {
@ -2821,9 +2821,9 @@ class QRcode {
/**
* Encode a Reed-Solomon codec and returns the parity array
* @param $rs (array) RS values
* @param $data (array) data
* @param $parity (array) parity
* @param array $rs RS values
* @param array $data data
* @param array $parity parity
* @return parity array
*/
protected function encode_rs_char($rs, $data, $parity) {

View File

@ -240,9 +240,9 @@ class TCPDF_COLORS {
/**
* Return the Spot color array.
* @param $name (string) Name of the spot color.
* @param $spotc (array) Reference to an array of spot colors.
* @return (array) Spot color array or false if not defined.
* @param string $name Name of the spot color.
* @param array $spotc Reference to an array of spot colors.
* @return array Spot color array or false if not defined.
* @since 5.9.125 (2011-10-03)
* @public static
*/
@ -264,10 +264,10 @@ class TCPDF_COLORS {
/**
* Returns an array (RGB or CMYK) from an html color name, or a six-digit (i.e. #3FE5AA), or three-digit (i.e. #7FF) hexadecimal color, or a javascript color array, or javascript color name.
* @param $hcolor (string) HTML color.
* @param $spotc (array) Reference to an array of spot colors.
* @param $defcol (array) Color to return in case of error.
* @return array RGB or CMYK color, or false in case of error.
* @param string $hcolor HTML color.
* @param array $spotc Reference to an array of spot colors.
* @param array $defcol Color to return in case of error.
* @return array|false RGB or CMYK color, or false in case of error.
* @public static
*/
public static function convertHTMLColorToDec($hcolor, &$spotc, $defcol=array('R'=>128,'G'=>128,'B'=>128)) {
@ -407,8 +407,8 @@ class TCPDF_COLORS {
/**
* Convert a color array into a string representation.
* @param $c (array) Array of colors.
* @return (string) The color array representation.
* @param array $c Array of colors.
* @return string The color array representation.
* @since 5.9.137 (2011-12-01)
* @public static
*/
@ -438,7 +438,7 @@ class TCPDF_COLORS {
/**
* Convert color to javascript color.
* @param $color (string) color name or "#RRGGBB"
* @param string $color color name or "#RRGGBB"
* @protected
* @since 2.1.002 (2008-02-12)
* @public static

View File

@ -60,7 +60,7 @@ class TCPDF_FILTERS {
/**
* Get a list of available decoding filters.
* @return (array) Array of available filter decoders.
* @return array Array of available filter decoders.
* @since 1.0.000 (2011-05-23)
* @public static
*/
@ -70,8 +70,8 @@ class TCPDF_FILTERS {
/**
* Decode data using the specified filter type.
* @param $filter (string) Filter name.
* @param $data (string) Data to decode.
* @param string $filter Filter name.
* @param string $data Data to decode.
* @return Decoded data string.
* @since 1.0.000 (2011-05-23)
* @public static
@ -130,7 +130,7 @@ class TCPDF_FILTERS {
/**
* Standard
* Default decoding filter (leaves data unchanged).
* @param $data (string) Data to decode.
* @param string $data Data to decode.
* @return Decoded data string.
* @since 1.0.000 (2011-05-23)
* @public static
@ -142,7 +142,7 @@ class TCPDF_FILTERS {
/**
* ASCIIHexDecode
* Decodes data encoded in an ASCII hexadecimal representation, reproducing the original binary data.
* @param $data (string) Data to decode.
* @param string $data Data to decode.
* @return Decoded data string.
* @since 1.0.000 (2011-05-23)
* @public static
@ -182,7 +182,7 @@ class TCPDF_FILTERS {
/**
* ASCII85Decode
* Decodes data encoded in an ASCII base-85 representation, reproducing the original binary data.
* @param $data (string) Data to decode.
* @param string $data Data to decode.
* @return Decoded data string.
* @since 1.0.000 (2011-05-23)
* @public static
@ -266,7 +266,7 @@ class TCPDF_FILTERS {
/**
* LZWDecode
* Decompresses data encoded using the LZW (Lempel-Ziv-Welch) adaptive compression method, reproducing the original text or binary data.
* @param $data (string) Data to decode.
* @param string $data Data to decode.
* @return Decoded data string.
* @since 1.0.000 (2011-05-23)
* @public static
@ -347,7 +347,7 @@ class TCPDF_FILTERS {
/**
* FlateDecode
* Decompresses data encoded using the zlib/deflate compression method, reproducing the original text or binary data.
* @param $data (string) Data to decode.
* @param string $data Data to decode.
* @return Decoded data string.
* @since 1.0.000 (2011-05-23)
* @public static
@ -364,7 +364,7 @@ class TCPDF_FILTERS {
/**
* RunLengthDecode
* Decompresses data encoded using a byte-oriented run-length encoding algorithm.
* @param $data (string) Data to decode.
* @param string $data Data to decode.
* @since 1.0.000 (2011-05-23)
* @public static
*/
@ -400,7 +400,7 @@ class TCPDF_FILTERS {
/**
* CCITTFaxDecode (NOT IMPLEMETED - RETURN AN EXCEPTION)
* Decompresses data encoded using the CCITT facsimile standard, reproducing the original data (typically monochrome image data at 1 bit per pixel).
* @param $data (string) Data to decode.
* @param string $data Data to decode.
* @return Decoded data string.
* @since 1.0.000 (2011-05-23)
* @public static
@ -413,7 +413,7 @@ class TCPDF_FILTERS {
/**
* JBIG2Decode (NOT IMPLEMETED - RETURN AN EXCEPTION)
* Decompresses data encoded using the JBIG2 standard, reproducing the original monochrome (1 bit per pixel) image data (or an approximation of that data).
* @param $data (string) Data to decode.
* @param string $data Data to decode.
* @return Decoded data string.
* @since 1.0.000 (2011-05-23)
* @public static
@ -426,7 +426,7 @@ class TCPDF_FILTERS {
/**
* DCTDecode (NOT IMPLEMETED - RETURN AN EXCEPTION)
* Decompresses data encoded using a DCT (discrete cosine transform) technique based on the JPEG standard, reproducing image sample data that approximates the original data.
* @param $data (string) Data to decode.
* @param string $data Data to decode.
* @return Decoded data string.
* @since 1.0.000 (2011-05-23)
* @public static
@ -439,7 +439,7 @@ class TCPDF_FILTERS {
/**
* JPXDecode (NOT IMPLEMETED - RETURN AN EXCEPTION)
* Decompresses data encoded using the wavelet-based JPEG2000 standard, reproducing the original image data.
* @param $data (string) Data to decode.
* @param string $data Data to decode.
* @return Decoded data string.
* @since 1.0.000 (2011-05-23)
* @public static
@ -452,7 +452,7 @@ class TCPDF_FILTERS {
/**
* Crypt (NOT IMPLEMETED - RETURN AN EXCEPTION)
* Decrypts data encrypted by a security handler, reproducing the data as it was before encryption.
* @param $data (string) Data to decode.
* @param string $data Data to decode.
* @return Decoded data string.
* @since 1.0.000 (2011-05-23)
* @public static
@ -466,7 +466,7 @@ class TCPDF_FILTERS {
/**
* Throw an exception.
* @param $msg (string) The error message
* @param string $msg The error message
* @since 1.0.000 (2011-05-23)
* @public static
*/

View File

@ -55,16 +55,16 @@ class TCPDF_FONTS {
/**
* Convert and add the selected TrueType or Type1 font to the fonts folder (that must be writeable).
* @param $fontfile (string) Font file (full path).
* @param $fonttype (string) Font type. Leave empty for autodetect mode. Valid values are: TrueTypeUnicode, TrueType, Type1, CID0JP = CID-0 Japanese, CID0KR = CID-0 Korean, CID0CS = CID-0 Chinese Simplified, CID0CT = CID-0 Chinese Traditional.
* @param $enc (string) Name of the encoding table to use. Leave empty for default mode. Omit this parameter for TrueType Unicode and symbolic fonts like Symbol or ZapfDingBats.
* @param $flags (int) Unsigned 32-bit integer containing flags specifying various characteristics of the font (PDF32000:2008 - 9.8.2 Font Descriptor Flags): +1 for fixed font; +4 for symbol or +32 for non-symbol; +64 for italic. Fixed and Italic mode are generally autodetected so you have to set it to 32 = non-symbolic font (default) or 4 = symbolic font.
* @param $outpath (string) Output path for generated font files (must be writeable by the web server). Leave empty for default font folder.
* @param $platid (int) Platform ID for CMAP table to extract (when building a Unicode font for Windows this value should be 3, for Macintosh should be 1).
* @param $encid (int) Encoding ID for CMAP table to extract (when building a Unicode font for Windows this value should be 1, for Macintosh should be 0). When Platform ID is 3, legal values for Encoding ID are: 0=Symbol, 1=Unicode, 2=ShiftJIS, 3=PRC, 4=Big5, 5=Wansung, 6=Johab, 7=Reserved, 8=Reserved, 9=Reserved, 10=UCS-4.
* @param $addcbbox (boolean) If true includes the character bounding box information on the php font file.
* @param $link (boolean) If true link to system font instead of copying the font data (not transportable) - Note: do not work with Type1 fonts.
* @return (string) TCPDF font name or boolean false in case of error.
* @param string $fontfile Font file (full path).
* @param string $fonttype Font type. Leave empty for autodetect mode. Valid values are: TrueTypeUnicode, TrueType, Type1, CID0JP = CID-0 Japanese, CID0KR = CID-0 Korean, CID0CS = CID-0 Chinese Simplified, CID0CT = CID-0 Chinese Traditional.
* @param string $enc Name of the encoding table to use. Leave empty for default mode. Omit this parameter for TrueType Unicode and symbolic fonts like Symbol or ZapfDingBats.
* @param int $flags Unsigned 32-bit integer containing flags specifying various characteristics of the font (PDF32000:2008 - 9.8.2 Font Descriptor Flags): +1 for fixed font; +4 for symbol or +32 for non-symbol; +64 for italic. Fixed and Italic mode are generally autodetected so you have to set it to 32 = non-symbolic font (default) or 4 = symbolic font.
* @param string $outpath Output path for generated font files (must be writeable by the web server). Leave empty for default font folder.
* @param int $platid Platform ID for CMAP table to extract (when building a Unicode font for Windows this value should be 3, for Macintosh should be 1).
* @param int $encid Encoding ID for CMAP table to extract (when building a Unicode font for Windows this value should be 1, for Macintosh should be 0). When Platform ID is 3, legal values for Encoding ID are: 0=Symbol, 1=Unicode, 2=ShiftJIS, 3=PRC, 4=Big5, 5=Wansung, 6=Johab, 7=Reserved, 8=Reserved, 9=Reserved, 10=UCS-4.
* @param boolean $addcbbox If true includes the character bounding box information on the php font file.
* @param boolean $link If true link to system font instead of copying the font data (not transportable) - Note: do not work with Type1 fonts.
* @return string|false TCPDF font name or boolean false in case of error.
* @author Nicola Asuni
* @since 5.9.123 (2010-09-30)
* @public static
@ -921,8 +921,8 @@ class TCPDF_FONTS {
/**
* Returs the checksum of a TTF table.
* @param $table (string) table to check
* @param $length (int) length of table in bytes
* @param string $table table to check
* @param int $length length of table in bytes
* @return int checksum
* @author Nicola Asuni
* @since 5.2.000 (2010-06-02)
@ -943,9 +943,9 @@ class TCPDF_FONTS {
/**
* Returns a subset of the TrueType font data without the unused glyphs.
* @param $font (string) TrueType font data.
* @param $subsetchars (array) Array of used characters (the glyphs to keep).
* @return (string) A subset of TrueType font data without the unused glyphs.
* @param string $font TrueType font data.
* @param array $subsetchars Array of used characters (the glyphs to keep).
* @return string A subset of TrueType font data without the unused glyphs.
* @author Nicola Asuni
* @since 5.2.000 (2010-06-02)
* @public static
@ -1389,9 +1389,9 @@ class TCPDF_FONTS {
/**
* Outputs font widths
* @param $font (array) font data
* @param $cidoffset (int) offset for CID values
* @return PDF command string for font widths
* @param array $font font data
* @param int $cidoffset offset for CID values
* @return string PDF command string for font widths
* @author Nicola Asuni
* @since 4.4.000 (2008-12-07)
* @public static
@ -1497,10 +1497,10 @@ class TCPDF_FONTS {
/**
* Update the CIDToGIDMap string with a new value.
* @param $map (string) CIDToGIDMap.
* @param $cid (int) CID value.
* @param $gid (int) GID value.
* @return (string) CIDToGIDMap.
* @param string $map CIDToGIDMap.
* @param int $cid CID value.
* @param int $gid GID value.
* @return string CIDToGIDMap.
* @author Nicola Asuni
* @since 5.9.123 (2011-09-29)
* @public static
@ -1535,8 +1535,8 @@ class TCPDF_FONTS {
/**
* Return font full path
* @param $file (string) Font file name.
* @param $fontdir (string) Font directory (set to false fto search on default directories)
* @param string $file Font file name.
* @param string $fontdir Font directory (set to false fto search on default directories)
* @return string Font full path or empty string
* @author Nicola Asuni
* @since 6.0.025
@ -1560,8 +1560,8 @@ class TCPDF_FONTS {
/**
* Get a reference font size.
* @param $size (string) String containing font size value.
* @param $refsize (float) Reference font size in points.
* @param string $size String containing font size value.
* @param float $refsize Reference font size in points.
* @return float value in points
* @public static
*/
@ -1659,9 +1659,9 @@ class TCPDF_FONTS {
/**
* Returns the unicode caracter specified by the value
* @param $c (int) UTF-8 value
* @param $unicode (boolean) True if we are in unicode mode, false otherwise.
* @return Returns the specified character.
* @param int $c UTF-8 value
* @param boolean $unicode True if we are in unicode mode, false otherwise.
* @return string Returns the specified character.
* @since 2.3.000 (2008-03-05)
* @public static
*/
@ -1688,8 +1688,8 @@ class TCPDF_FONTS {
/**
* Returns the unicode caracter specified by UTF-8 value
* @param $c (int) UTF-8 value
* @return Returns the specified character.
* @param int $c UTF-8 value
* @return string Returns the specified character.
* @public static
*/
public static function unichrUnicode($c) {
@ -1698,8 +1698,8 @@ class TCPDF_FONTS {
/**
* Returns the unicode caracter specified by ASCII value
* @param $c (int) UTF-8 value
* @return Returns the specified character.
* @param int $c UTF-8 value
* @return string Returns the specified character.
* @public static
*/
public static function unichrASCII($c) {
@ -1736,8 +1736,8 @@ class TCPDF_FONTS {
* W1 = 110110yyyyyyyyyy
* W2 = 110111xxxxxxxxxx
* </pre>
* @param $unicode (array) array containing UTF-8 unicode values
* @param $setbom (boolean) if true set the Byte Order Mark (BOM = 0xFEFF)
* @param array $unicode array containing UTF-8 unicode values
* @param boolean $setbom if true set the Byte Order Mark (BOM = 0xFEFF)
* @return string
* @protected
* @author Nicola Asuni
@ -1772,9 +1772,9 @@ class TCPDF_FONTS {
/**
* Convert an array of UTF8 values to array of unicode characters
* @param $ta (array) The input array of UTF8 values.
* @param $isunicode (boolean) True for Unicode mode, false otherwise.
* @return Return array of unicode characters
* @param array $ta The input array of UTF8 values.
* @param boolean $isunicode True for Unicode mode, false otherwise.
* @return array Return array of unicode characters
* @since 4.5.037 (2009-04-07)
* @public static
*/
@ -1787,11 +1787,11 @@ class TCPDF_FONTS {
/**
* Extract a slice of the $strarr array and return it as string.
* @param $strarr (string) The input array of characters.
* @param $start (int) the starting element of $strarr.
* @param $end (int) first element that will not be returned.
* @param $unicode (boolean) True if we are in unicode mode, false otherwise.
* @return Return part of a string
* @param string $strarr The input array of characters.
* @param int $start the starting element of $strarr.
* @param int $end first element that will not be returned.
* @param boolean $unicode True if we are in unicode mode, false otherwise.
* @return string Return part of a string
* @public static
*/
public static function UTF8ArrSubString($strarr, $start='', $end='', $unicode=true) {
@ -1810,10 +1810,10 @@ class TCPDF_FONTS {
/**
* Extract a slice of the $uniarr array and return it as string.
* @param $uniarr (string) The input array of characters.
* @param $start (int) the starting element of $strarr.
* @param $end (int) first element that will not be returned.
* @return Return part of a string
* @param string $uniarr The input array of characters.
* @param int $start the starting element of $strarr.
* @param int $end first element that will not be returned.
* @return string Return part of a string
* @since 4.5.037 (2009-04-07)
* @public static
*/
@ -1833,7 +1833,7 @@ class TCPDF_FONTS {
/**
* Converts UTF-8 characters array to array of Latin1 characters array<br>
* @param $unicode (array) array containing UTF-8 unicode values
* @param array $unicode array containing UTF-8 unicode values
* @return array
* @author Nicola Asuni
* @since 4.8.023 (2010-01-15)
@ -1858,7 +1858,7 @@ class TCPDF_FONTS {
/**
* Converts UTF-8 characters array to array of Latin1 string<br>
* @param $unicode (array) array containing UTF-8 unicode values
* @param array $unicode array containing UTF-8 unicode values
* @return array
* @author Nicola Asuni
* @since 4.8.023 (2010-01-15)
@ -1884,7 +1884,7 @@ class TCPDF_FONTS {
/**
* Converts UTF-8 character to integer value.<br>
* Uses the getUniord() method if the value is not cached.
* @param $uch (string) character string to process.
* @param string $uch character string to process.
* @return int Unicode value
* @public static
*/
@ -1923,7 +1923,7 @@ class TCPDF_FONTS {
* UTF8-tail = %x80-BF
* ---------------------------------------------------------------------
* </pre>
* @param $uch (string) character string to process.
* @param string $uch character string to process.
* @return int Unicode value
* @author Nicola Asuni
* @public static
@ -1990,9 +1990,9 @@ class TCPDF_FONTS {
/**
* Converts UTF-8 strings to codepoints array.<br>
* Invalid byte sequences will be replaced with 0xFFFD (replacement character)<br>
* @param $str (string) string to process.
* @param $isunicode (boolean) True when the documetn is in Unicode mode, false otherwise.
* @param $currentfont (array) Reference to current font array.
* @param string $str string to process.
* @param boolean $isunicode True when the documetn is in Unicode mode, false otherwise.
* @param array $currentfont Reference to current font array.
* @return array containing codepoints (UTF-8 characters values)
* @author Nicola Asuni
* @public static
@ -2016,9 +2016,9 @@ class TCPDF_FONTS {
/**
* Converts UTF-8 strings to Latin1 when using the standard 14 core fonts.<br>
* @param $str (string) string to process.
* @param $isunicode (boolean) True when the documetn is in Unicode mode, false otherwise.
* @param $currentfont (array) Reference to current font array.
* @param string $str string to process.
* @param boolean $isunicode True when the documetn is in Unicode mode, false otherwise.
* @param array $currentfont Reference to current font array.
* @return string
* @since 3.2.000 (2008-06-23)
* @public static
@ -2030,10 +2030,10 @@ class TCPDF_FONTS {
/**
* Converts UTF-8 strings to UTF16-BE.<br>
* @param $str (string) string to process.
* @param $setbom (boolean) if true set the Byte Order Mark (BOM = 0xFEFF)
* @param $isunicode (boolean) True when the documetn is in Unicode mode, false otherwise.
* @param $currentfont (array) Reference to current font array.
* @param string $str string to process.
* @param boolean $setbom if true set the Byte Order Mark (BOM = 0xFEFF)
* @param boolean $isunicode True when the documetn is in Unicode mode, false otherwise.
* @param array $currentfont Reference to current font array.
* @return string
* @author Nicola Asuni
* @since 1.53.0.TC005 (2005-01-05)
@ -2049,11 +2049,11 @@ class TCPDF_FONTS {
/**
* Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).
* @param $str (string) string to manipulate.
* @param $setbom (bool) if true set the Byte Order Mark (BOM = 0xFEFF)
* @param $forcertl (bool) if true forces RTL text direction
* @param $isunicode (boolean) True if the document is in Unicode mode, false otherwise.
* @param $currentfont (array) Reference to current font array.
* @param string $str string to manipulate.
* @param bool $setbom if true set the Byte Order Mark (BOM = 0xFEFF)
* @param bool $forcertl if true forces RTL text direction
* @param boolean $isunicode True if the document is in Unicode mode, false otherwise.
* @param array $currentfont Reference to current font array.
* @return string
* @author Nicola Asuni
* @since 2.1.000 (2008-01-08)
@ -2065,12 +2065,12 @@ class TCPDF_FONTS {
/**
* Reverse the RLT substrings array using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).
* @param $arr (array) array of unicode values.
* @param $str (string) string to manipulate (or empty value).
* @param $setbom (bool) if true set the Byte Order Mark (BOM = 0xFEFF)
* @param $forcertl (bool) if true forces RTL text direction
* @param $isunicode (boolean) True if the document is in Unicode mode, false otherwise.
* @param $currentfont (array) Reference to current font array.
* @param array $arr array of unicode values.
* @param string $str string to manipulate (or empty value).
* @param bool $setbom if true set the Byte Order Mark (BOM = 0xFEFF)
* @param bool $forcertl if true forces RTL text direction
* @param boolean $isunicode True if the document is in Unicode mode, false otherwise.
* @param array $currentfont Reference to current font array.
* @return string
* @author Nicola Asuni
* @since 4.9.000 (2010-03-27)
@ -2082,11 +2082,11 @@ class TCPDF_FONTS {
/**
* Reverse the RLT substrings using the Bidirectional Algorithm (http://unicode.org/reports/tr9/).
* @param $ta (array) array of characters composing the string.
* @param $str (string) string to process
* @param $forcertl (bool) if 'R' forces RTL, if 'L' forces LTR
* @param $isunicode (boolean) True if the document is in Unicode mode, false otherwise.
* @param $currentfont (array) Reference to current font array.
* @param array $ta array of characters composing the string.
* @param string $str string to process
* @param bool $forcertl if 'R' forces RTL, if 'L' forces LTR
* @param boolean $isunicode True if the document is in Unicode mode, false otherwise.
* @param array $currentfont Reference to current font array.
* @return array of unicode chars
* @author Nicola Asuni
* @since 2.4.000 (2008-03-06)

View File

@ -55,6 +55,8 @@ class TCPDF_IMAGES {
* Array of hinheritable SVG properties.
* @since 5.0.000 (2010-05-02)
* @public static
*
* @var string[]
*/
public static $svginheritprop = array('clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cursor', 'direction', 'display', 'fill', 'fill-opacity', 'fill-rule', 'font', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'image-rendering', 'kerning', 'letter-spacing', 'marker', 'marker-end', 'marker-mid', 'marker-start', 'pointer-events', 'shape-rendering', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-rendering', 'visibility', 'word-spacing', 'writing-mode');
@ -62,8 +64,8 @@ class TCPDF_IMAGES {
/**
* Return the image type given the file name or array returned by getimagesize() function.
* @param $imgfile (string) image file name
* @param $iminfo (array) array of image information returned by getimagesize() function.
* @param string $imgfile image file name
* @param array $iminfo array of image information returned by getimagesize() function.
* @return string image type
* @since 4.8.017 (2009-11-27)
* @public static
@ -87,9 +89,9 @@ class TCPDF_IMAGES {
/**
* Set the transparency for the given GD image.
* @param $new_image (image) GD image object
* @param $image (image) GD image object.
* return GD image object.
* @param resource $new_image GD image object
* @param resource $image GD image object.
* @return resource GD image object $new_image
* @since 4.9.016 (2010-04-20)
* @public static
*/
@ -112,8 +114,8 @@ class TCPDF_IMAGES {
/**
* Convert the loaded image to a PNG and then return a structure for the PDF creator.
* This function requires GD library and write access to the directory defined on K_PATH_CACHE constant.
* @param $image (image) Image object.
* @param $tempfile (string) Temporary file name.
* @param resource $image Image object.
* @param string $tempfile Temporary file name.
* return image PNG image object.
* @since 4.9.016 (2010-04-20)
* @public static
@ -135,10 +137,10 @@ class TCPDF_IMAGES {
/**
* Convert the loaded image to a JPEG and then return a structure for the PDF creator.
* This function requires GD library and write access to the directory defined on K_PATH_CACHE constant.
* @param $image (image) Image object.
* @param $quality (int) JPEG quality.
* @param $tempfile (string) Temporary file name.
* return image JPEG image object.
* @param resource $image Image object.
* @param int $quality JPEG quality.
* @param string $tempfile Temporary file name.
* return array|false image JPEG image object.
* @public static
*/
public static function _toJPEG($image, $quality, $tempfile) {
@ -152,8 +154,8 @@ class TCPDF_IMAGES {
/**
* Extract info from a JPEG file without using the GD library.
* @param $file (string) image file to parse
* @return array structure containing the image data
* @param string $file image file to parse
* @return array|false structure containing the image data
* @public static
*/
public static function _parsejpeg($file) {
@ -231,8 +233,8 @@ class TCPDF_IMAGES {
/**
* Extract info from a PNG file without using the GD library.
* @param $file (string) image file to parse
* @return array structure containing the image data
* @param string $file image file to parse
* @return array|false structure containing the image data
* @public static
*/
public static function _parsepng($file) {

View File

@ -110,7 +110,7 @@ class TCPDF_STATIC {
/**
* Return the current TCPDF version.
* @return TCPDF version string
* @return string TCPDF version string
* @since 5.9.012 (2010-11-10)
* @public static
*/
@ -120,7 +120,7 @@ class TCPDF_STATIC {
/**
* Return the current TCPDF producer.
* @return TCPDF producer string
* @return string TCPDF producer string
* @since 6.0.000 (2013-03-16)
* @public static
*/
@ -130,7 +130,7 @@ class TCPDF_STATIC {
/**
* Sets the current active configuration setting of magic_quotes_runtime (if the set_magic_quotes_runtime function exist)
* @param $mqr (boolean) FALSE for off, TRUE for on.
* @param boolean $mqr FALSE for off, TRUE for on.
* @since 4.6.025 (2009-08-17)
* @public static
*/
@ -146,7 +146,7 @@ class TCPDF_STATIC {
/**
* Gets the current active configuration setting of magic_quotes_runtime (if the get_magic_quotes_runtime function exist)
* @return Returns 0 if magic quotes runtime is off or get_magic_quotes_runtime doesn't exist, 1 otherwise.
* @return int Returns 0 if magic quotes runtime is off or get_magic_quotes_runtime doesn't exist, 1 otherwise.
* @since 4.6.025 (2009-08-17)
* @public static
*/
@ -163,7 +163,7 @@ class TCPDF_STATIC {
/**
* Check if the URL exist.
* @param $url (string) URL to check.
* @param string $url URL to check.
* @return Boolean true if the URl exist, false otherwise.
* @since 5.9.204 (2013-01-28)
* @public static
@ -184,8 +184,8 @@ class TCPDF_STATIC {
* <li>UTF-8 (hex): 0xC2 0xAD (c2ad)</li>
* <li>UTF-8 character: chr(194).chr(173)</li>
* </ul>
* @param $txt (string) input string
* @param $unicode (boolean) True if we are in unicode mode, false otherwise.
* @param string $txt input string
* @param boolean $unicode True if we are in unicode mode, false otherwise.
* @return string without SHY characters.
* @since (4.5.019) 2009-02-28
* @public static
@ -201,10 +201,10 @@ class TCPDF_STATIC {
/**
* Get the border mode accounting for multicell position (opens bottom side of multicell crossing pages)
* @param $brd (mixed) Indicates if borders must be drawn around the cell block. The value can be 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> or an array of line styles for each border group: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)))
* @param $position (string) multicell position: 'start', 'middle', 'end'
* @param $opencell (boolean) True when the cell is left open at the page bottom, false otherwise.
* @return border mode array
* @param string|array|int $brd Indicates if borders must be drawn around the cell block. The value can be 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> or an array of line styles for each border group: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)))
* @param string $position multicell position: 'start', 'middle', 'end'
* @param boolean $opencell True when the cell is left open at the page bottom, false otherwise.
* @return array border mode array
* @since 4.4.002 (2008-12-09)
* @public static
*/
@ -275,7 +275,7 @@ class TCPDF_STATIC {
/**
* Determine whether a string is empty.
* @param $str (string) string to be checked
* @param string $str string to be checked
* @return bool true if string is empty
* @since 4.5.044 (2009-04-16)
* @public static
@ -286,8 +286,8 @@ class TCPDF_STATIC {
/**
* Returns a temporary filename for caching object on filesystem.
* @param $type (string) Type of file (name of the subdir on the tcpdf cache folder).
* @param $file_id (string) TCPDF file_id.
* @param string $type Type of file (name of the subdir on the tcpdf cache folder).
* @param string $file_id TCPDF file_id.
* @return string filename.
* @since 4.5.000 (2008-12-31)
* @public static
@ -298,7 +298,7 @@ class TCPDF_STATIC {
/**
* Add "\" before "\", "(" and ")"
* @param $s (string) string to escape.
* @param string $s string to escape.
* @return string escaped string.
* @public static
*/
@ -309,8 +309,8 @@ class TCPDF_STATIC {
/**
* Escape some special characters (&lt; &gt; &amp;) for XML output.
* @param $str (string) Input string to convert.
* @return converted string
* @param string $str Input string to convert.
* @return string converted string
* @since 5.9.121 (2011-09-28)
* @public static
*/
@ -322,8 +322,8 @@ class TCPDF_STATIC {
/**
* Creates a copy of a class object
* @param $object (object) class object to be cloned
* @return cloned object
* @param object $object class object to be cloned
* @return object cloned object
* @since 4.5.029 (2009-03-19)
* @public static
*/
@ -337,8 +337,8 @@ class TCPDF_STATIC {
/**
* Output input data and compress it if possible.
* @param $data (string) Data to output.
* @param $length (int) Data length in bytes.
* @param string $data Data to output.
* @param int $length Data length in bytes.
* @since 5.9.086
* @public static
*/
@ -352,10 +352,10 @@ class TCPDF_STATIC {
/**
* Replace page number aliases with number.
* @param $page (string) Page content.
* @param $replace (array) Array of replacements (array keys are replacement strings, values are alias arrays).
* @param $diff (int) If passed, this will be set to the total char number difference between alias and replacements.
* @return replaced page content and updated $diff parameter as array.
* @param string $page Page content.
* @param array $replace Array of replacements (array keys are replacement strings, values are alias arrays).
* @param int $diff If passed, this will be set to the total char number difference between alias and replacements.
* @return array replaced page content and updated $diff parameter as array.
* @public static
*/
public static function replacePageNumAliases($page, $replace, $diff=0) {
@ -372,7 +372,7 @@ class TCPDF_STATIC {
/**
* Returns timestamp in seconds from formatted date-time.
* @param $date (string) Formatted date-time.
* @param string $date Formatted date-time.
* @return int seconds.
* @since 5.9.152 (2012-03-23)
* @public static
@ -387,7 +387,7 @@ class TCPDF_STATIC {
/**
* Returns a formatted date-time.
* @param $time (int) Time in seconds.
* @param int $time Time in seconds.
* @return string escaped date string.
* @since 5.9.152 (2012-03-23)
* @public static
@ -398,7 +398,7 @@ class TCPDF_STATIC {
/**
* Returns a string containing random data to be used as a seed for encryption methods.
* @param $seed (string) starting seed value
* @param string $seed starting seed value
* @return string containing random data
* @author Nicola Asuni
* @since 5.9.006 (2010-10-19)
@ -422,8 +422,8 @@ class TCPDF_STATIC {
/**
* Encrypts a string using MD5 and returns it's value as a binary string.
* @param $str (string) input string
* @return String MD5 encrypted binary string
* @param string $str input string
* @return string MD5 encrypted binary string
* @since 2.0.000 (2008-01-02)
* @public static
*/
@ -432,11 +432,11 @@ class TCPDF_STATIC {
}
/**
* Returns the input text exrypted using AES algorithm and the specified key.
* Returns the input text encrypted using AES algorithm and the specified key.
* This method requires openssl or mcrypt. Text is padded to 16bytes blocks
* @param $key (string) encryption key
* @param $text (String) input text to be encrypted
* @return String encrypted text
* @param string $key encryption key
* @param string $text input text to be encrypted
* @return string encrypted text
* @author Nicola Asuni
* @since 5.0.005 (2010-05-11)
* @public static
@ -457,11 +457,11 @@ class TCPDF_STATIC {
}
/**
* Returns the input text exrypted using AES algorithm and the specified key.
* Returns the input text encrypted using AES algorithm and the specified key.
* This method requires openssl or mcrypt. Text is not padded
* @param $key (string) encryption key
* @param $text (String) input text to be encrypted
* @return String encrypted text
* @param string $key encryption key
* @param string $text input text to be encrypted
* @return string encrypted text
* @author Nicola Asuni
* @since TODO
* @public static
@ -480,11 +480,11 @@ class TCPDF_STATIC {
/**
* Returns the input text encrypted using RC4 algorithm and the specified key.
* RC4 is the standard encryption algorithm used in PDF format
* @param $key (string) Encryption key.
* @param $text (String) Input text to be encrypted.
* @param $last_enc_key (String) Reference to last RC4 key encrypted.
* @param $last_enc_key_c (String) Reference to last RC4 computed key.
* @return String encrypted text
* @param string $key Encryption key.
* @param string $text Input text to be encrypted.
* @param string $last_enc_key Reference to last RC4 key encrypted.
* @param string $last_enc_key_c Reference to last RC4 computed key.
* @return string encrypted text
* @since 2.0.000 (2008-01-02)
* @author Klemen Vodopivec, Nicola Asuni
* @public static
@ -527,8 +527,8 @@ class TCPDF_STATIC {
/**
* Return the permission code used on encryption (P value).
* @param $permissions (Array) the set of permissions (specify the ones you want to block).
* @param $mode (int) encryption strength: 0 = RC4 40 bit; 1 = RC4 128 bit; 2 = AES 128 bit; 3 = AES 256 bit.
* @param array $permissions the set of permissions (specify the ones you want to block).
* @param int $mode encryption strength: 0 = RC4 40 bit; 1 = RC4 128 bit; 2 = AES 128 bit; 3 = AES 256 bit.
* @since 5.0.005 (2010-05-12)
* @author Nicola Asuni
* @public static
@ -564,8 +564,8 @@ class TCPDF_STATIC {
/**
* Convert hexadecimal string to string
* @param $bs (string) byte-string to convert
* @return String
* @param string $bs byte-string to convert
* @return string
* @since 5.0.005 (2010-05-12)
* @author Nicola Asuni
* @public static
@ -586,8 +586,8 @@ class TCPDF_STATIC {
/**
* Convert string to hexadecimal string (byte string)
* @param $s (string) string to convert
* @return byte string
* @param string $s string to convert
* @return string byte string
* @since 5.0.010 (2010-05-17)
* @author Nicola Asuni
* @public static
@ -603,8 +603,8 @@ class TCPDF_STATIC {
/**
* Convert encryption P value to a string of bytes, low-order byte first.
* @param $protection (string) 32bit encryption permission value (P value)
* @return String
* @param string $protection 32bit encryption permission value (P value)
* @return string
* @since 5.0.005 (2010-05-12)
* @author Nicola Asuni
* @public static
@ -620,8 +620,8 @@ class TCPDF_STATIC {
/**
* Encode a name object.
* @param $name (string) Name object to encode.
* @return (string) Encoded name object.
* @param string $name Name object to encode.
* @return string Encoded name object.
* @author Nicola Asuni
* @since 5.9.097 (2011-06-23)
* @public static
@ -642,9 +642,9 @@ class TCPDF_STATIC {
/**
* Convert JavaScript form fields properties array to Annotation Properties array.
* @param $prop (array) javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
* @param $spot_colors (array) Reference to spot colors array.
* @param $rtl (boolean) True if in Right-To-Left text direction mode, false otherwise.
* @param array $prop javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
* @param array $spot_colors Reference to spot colors array.
* @param boolean $rtl True if in Right-To-Left text direction mode, false otherwise.
* @return array of annotation properties
* @author Nicola Asuni
* @since 4.8.000 (2009-09-06)
@ -652,7 +652,7 @@ class TCPDF_STATIC {
*/
public static function getAnnotOptFromJSProp($prop, &$spot_colors, $rtl=false) {
if (isset($prop['aopt']) AND is_array($prop['aopt'])) {
// the annotation options area lready defined
// the annotation options are already defined
return $prop['aopt'];
}
$opt = array(); // value to be returned
@ -1011,8 +1011,9 @@ class TCPDF_STATIC {
/**
* Format the page numbers.
* This method can be overriden for custom formats.
* @param $num (int) page number
* This method can be overridden for custom formats.
* @param int $num page number
* @return string
* @since 4.2.005 (2008-11-06)
* @public static
*/
@ -1022,8 +1023,9 @@ class TCPDF_STATIC {
/**
* Format the page numbers on the Table Of Content.
* This method can be overriden for custom formats.
* @param $num (int) page number
* This method can be overridden for custom formats.
* @param int $num page number
* @return string
* @since 4.5.001 (2009-01-04)
* @see addTOC(), addHTMLTOC()
* @public static
@ -1034,8 +1036,8 @@ class TCPDF_STATIC {
/**
* Extracts the CSS properties from a CSS string.
* @param $cssdata (string) string containing CSS definitions.
* @return An array where the keys are the CSS selectors and the values are the CSS properties.
* @param string $cssdata string containing CSS definitions.
* @return array An array where the keys are the CSS selectors and the values are the CSS properties.
* @author Nicola Asuni
* @since 5.1.000 (2010-05-25)
* @public static
@ -1125,11 +1127,11 @@ class TCPDF_STATIC {
/**
* Cleanup HTML code (requires HTML Tidy library).
* @param $html (string) htmlcode to fix
* @param $default_css (string) CSS commands to add
* @param $tagvs (array) parameters for setHtmlVSpace method
* @param $tidy_options (array) options for tidy_parse_string function
* @param $tagvspaces (array) Array of vertical spaces for tags.
* @param string $html htmlcode to fix
* @param string $default_css CSS commands to add
* @param array $tagvs parameters for setHtmlVSpace method
* @param array $tidy_options options for tidy_parse_string function
* @param array $tagvspaces Array of vertical spaces for tags.
* @return string XHTML code cleaned up
* @author Nicola Asuni
* @since 5.9.017 (2010-11-16)
@ -1195,9 +1197,9 @@ class TCPDF_STATIC {
/**
* Returns true if the CSS selector is valid for the selected HTML tag
* @param $dom (array) array of HTML tags and properties
* @param $key (int) key of the current HTML tag
* @param $selector (string) CSS selector string
* @param array $dom array of HTML tags and properties
* @param int $key key of the current HTML tag
* @param string $selector CSS selector string
* @return true if the selector is valid, false otherwise
* @since 5.1.000 (2010-05-25)
* @public static
@ -1355,9 +1357,9 @@ class TCPDF_STATIC {
/**
* Returns the styles array that apply for the selected HTML tag.
* @param $dom (array) array of HTML tags and properties
* @param $key (int) key of the current HTML tag
* @param $css (array) array of CSS properties
* @param array $dom array of HTML tags and properties
* @param int $key key of the current HTML tag
* @param array $css array of CSS properties
* @return array containing CSS properties
* @since 5.1.000 (2010-05-25)
* @public static
@ -1402,7 +1404,7 @@ class TCPDF_STATIC {
/**
* Compact CSS data array into single string.
* @param $css (array) array of CSS properties
* @param array $css array of CSS properties
* @return string containing merged CSS properties
* @since 5.9.070 (2011-04-19)
* @public static
@ -1433,7 +1435,7 @@ class TCPDF_STATIC {
/**
* Returns the Roman representation of an integer number
* @param $number (int) number to convert
* @param int $number number to convert
* @return string roman representation of the specified number
* @since 4.4.004 (2008-12-10)
* @public static
@ -1501,10 +1503,10 @@ class TCPDF_STATIC {
/**
* Find position of last occurrence of a substring in a string
* @param $haystack (string) The string to search in.
* @param $needle (string) substring to search.
* @param $offset (int) May be specified to begin searching an arbitrary number of characters into the string.
* @return Returns the position where the needle exists. Returns FALSE if the needle was not found.
* @param string $haystack The string to search in.
* @param string $needle substring to search.
* @param int $offset May be specified to begin searching an arbitrary number of characters into the string.
* @return int|false Returns the position where the needle exists. Returns FALSE if the needle was not found.
* @since 4.8.038 (2010-03-13)
* @public static
*/
@ -1517,7 +1519,7 @@ class TCPDF_STATIC {
/**
* Returns an array of hyphenation patterns.
* @param $file (string) TEX file containing hypenation patterns. TEX pattrns can be downloaded from http://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/
* @param string $file TEX file containing hypenation patterns. TEX patterns can be downloaded from http://www.ctan.org/tex-archive/language/hyph-utf8/tex/generic/hyph-utf8/patterns/
* @return array of hyphenation patterns
* @author Nicola Asuni
* @since 4.9.012 (2010-04-12)
@ -1550,7 +1552,7 @@ class TCPDF_STATIC {
/**
* Get the Path-Painting Operators.
* @param $style (string) Style of rendering. Possible values are:
* @param string $style Style of rendering. Possible values are:
* <ul>
* <li>S or D: Stroke the path.</li>
* <li>s or d: Close and stroke the path.</li>
@ -1564,7 +1566,8 @@ class TCPDF_STATIC {
* <li>CEO: Clipping mode using the nonzero winding number rule to determine which regions lie inside the clipping path</li>
* <li>n: End the path object without filling or stroking it.</li>
* </ul>
* @param $default (string) default style
* @param string $default default style
* @return string
* @author Nicola Asuni
* @since 5.0.000 (2010-04-30)
* @public static
@ -1641,9 +1644,9 @@ class TCPDF_STATIC {
/**
* Get the product of two SVG tranformation matrices
* @param $ta (array) first SVG tranformation matrix
* @param $tb (array) second SVG tranformation matrix
* @return transformation array
* @param array $ta first SVG tranformation matrix
* @param array $tb second SVG tranformation matrix
* @return array transformation array
* @author Nicola Asuni
* @since 5.0.000 (2010-05-02)
* @public static
@ -1661,7 +1664,7 @@ class TCPDF_STATIC {
/**
* Get the tranformation matrix from SVG transform attribute
* @param $attribute (string) transformation
* @param string $attribute transformation
* @return array of transformations
* @author Nicola Asuni
* @since 5.0.000 (2010-05-02)
@ -1756,10 +1759,10 @@ class TCPDF_STATIC {
/**
* Returns the angle in radiants between two vectors
* @param $x1 (int) X coordinate of first vector point
* @param $y1 (int) Y coordinate of first vector point
* @param $x2 (int) X coordinate of second vector point
* @param $y2 (int) Y coordinate of second vector point
* @param int $x1 X coordinate of first vector point
* @param int $y1 Y coordinate of first vector point
* @param int $x2 X coordinate of second vector point
* @param int $y2 Y coordinate of second vector point
* @author Nicola Asuni
* @since 5.0.000 (2010-05-04)
* @public static
@ -1781,12 +1784,12 @@ class TCPDF_STATIC {
/**
* Split string by a regular expression.
* This is a wrapper for the preg_split function to avoid the bug: https://bugs.php.net/bug.php?id=45850
* @param $pattern (string) The regular expression pattern to search for without the modifiers, as a string.
* @param $modifiers (string) The modifiers part of the pattern,
* @param $subject (string) The input string.
* @param $limit (int) If specified, then only substrings up to limit are returned with the rest of the string being placed in the last substring. A limit of -1, 0 or NULL means "no limit" and, as is standard across PHP, you can use NULL to skip to the flags parameter.
* @param $flags (int) The flags as specified on the preg_split PHP function.
* @return Returns an array containing substrings of subject split along boundaries matched by pattern.modifier
* @param string $pattern The regular expression pattern to search for without the modifiers, as a string.
* @param string $modifiers The modifiers part of the pattern,
* @param string $subject The input string.
* @param int $limit If specified, then only substrings up to limit are returned with the rest of the string being placed in the last substring. A limit of -1, 0 or NULL means "no limit" and, as is standard across PHP, you can use NULL to skip to the flags parameter.
* @param int $flags The flags as specified on the preg_split PHP function.
* @return array Returns an array containing substrings of subject split along boundaries matched by pattern.modifier
* @author Nicola Asuni
* @since 6.0.023
* @public static
@ -1811,9 +1814,9 @@ class TCPDF_STATIC {
/**
* Wrapper to use fopen only with local files
* @param filename (string) Name of the file to open
* @param $mode (string)
* @return Returns a file pointer resource on success, or FALSE on error.
* @param string $filename Name of the file to open
* @param string $mode
* @return resource|false Returns a file pointer resource on success, or FALSE on error.
* @public static
*/
public static function fopenLocal($filename, $mode) {
@ -1827,9 +1830,10 @@ class TCPDF_STATIC {
/**
* Check if the URL exist.
* @param url (string) URL to check.
* @return Returns TRUE if the URL exists; FALSE otherwise.
* @param string $url URL to check.
* @return bool Returns TRUE if the URL exists; FALSE otherwise.
* @public static
* @since 6.2.25
*/
public static function url_exists($url) {
$crs = curl_init();
@ -1880,8 +1884,8 @@ class TCPDF_STATIC {
* Wrapper for file_exists.
* Checks whether a file or directory exists.
* Only allows some protocols and local files.
* @param filename (string) Path to the file or directory.
* @return Returns TRUE if the file or directory specified by filename exists; FALSE otherwise.
* @param string $filename Path to the file or directory.
* @return bool Returns TRUE if the file or directory specified by filename exists; FALSE otherwise.
* @public static
*/
public static function file_exists($filename) {
@ -1897,8 +1901,8 @@ class TCPDF_STATIC {
/**
* Reads entire file into a string.
* The file can be also an URL.
* @param $file (string) Name of the file or URL to read.
* @return The function returns the read data or FALSE on failure.
* @param string $file Name of the file or URL to read.
* @return string|false The function returns the read data or FALSE on failure.
* @author Nicola Asuni
* @since 6.0.025
* @public static
@ -1997,8 +2001,8 @@ class TCPDF_STATIC {
/**
* Get ULONG from string (Big Endian 32-bit unsigned integer).
* @param $str (string) string from where to extract value
* @param $offset (int) point from where to read the data
* @param string $str string from where to extract value
* @param int $offset point from where to read the data
* @return int 32 bit value
* @author Nicola Asuni
* @since 5.2.000 (2010-06-02)
@ -2011,8 +2015,8 @@ class TCPDF_STATIC {
/**
* Get USHORT from string (Big Endian 16-bit unsigned integer).
* @param $str (string) string from where to extract value
* @param $offset (int) point from where to read the data
* @param string $str string from where to extract value
* @param int $offset point from where to read the data
* @return int 16 bit value
* @author Nicola Asuni
* @since 5.2.000 (2010-06-02)
@ -2025,8 +2029,8 @@ class TCPDF_STATIC {
/**
* Get SHORT from string (Big Endian 16-bit signed integer).
* @param $str (string) String from where to extract value.
* @param $offset (int) Point from where to read the data.
* @param string $str String from where to extract value.
* @param int $offset Point from where to read the data.
* @return int 16 bit value
* @author Nicola Asuni
* @since 5.2.000 (2010-06-02)
@ -2039,8 +2043,8 @@ class TCPDF_STATIC {
/**
* Get FWORD from string (Big Endian 16-bit signed integer).
* @param $str (string) String from where to extract value.
* @param $offset (int) Point from where to read the data.
* @param string $str String from where to extract value.
* @param int $offset Point from where to read the data.
* @return int 16 bit value
* @author Nicola Asuni
* @since 5.9.123 (2011-09-30)
@ -2056,8 +2060,8 @@ class TCPDF_STATIC {
/**
* Get UFWORD from string (Big Endian 16-bit unsigned integer).
* @param $str (string) string from where to extract value
* @param $offset (int) point from where to read the data
* @param string $str string from where to extract value
* @param int $offset point from where to read the data
* @return int 16 bit value
* @author Nicola Asuni
* @since 5.9.123 (2011-09-30)
@ -2070,8 +2074,8 @@ class TCPDF_STATIC {
/**
* Get FIXED from string (32-bit signed fixed-point number (16.16).
* @param $str (string) string from where to extract value
* @param $offset (int) point from where to read the data
* @param string $str string from where to extract value
* @param int $offset point from where to read the data
* @return int 16 bit value
* @author Nicola Asuni
* @since 5.9.123 (2011-09-30)
@ -2088,8 +2092,8 @@ class TCPDF_STATIC {
/**
* Get BYTE from string (8-bit unsigned integer).
* @param $str (string) String from where to extract value.
* @param $offset (int) Point from where to read the data.
* @param string $str String from where to extract value.
* @param int $offset Point from where to read the data.
* @return int 8 bit value
* @author Nicola Asuni
* @since 5.2.000 (2010-06-02)
@ -2102,9 +2106,9 @@ class TCPDF_STATIC {
/**
* Binary-safe and URL-safe file read.
* 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.
* @param $handle (resource)
* @param $length (int)
* @return Returns the read string or FALSE in case of error.
* @param resource $handle
* @param int $length
* @return string|false Returns the read string or FALSE in case of error.
* @author Nicola Asuni
* @since 4.5.027 (2009-03-16)
* @public static
@ -2123,8 +2127,8 @@ class TCPDF_STATIC {
/**
* Read a 4-byte (32 bit) integer from file.
* @param $f (string) file name.
* @return 4-byte integer
* @param string $f file name.
* @return int 4-byte integer
* @public static
*/
public static function _freadint($f) {
@ -2132,11 +2136,12 @@ class TCPDF_STATIC {
return $a['i'];
}
/**
* Array of page formats
* measures are calculated in this way: (inches * 72) or (millimeters * 72 / 25.4)
* @public static
*
* @var array<string,float[]>
*/
public static $page_formats = array(
// ISO 216 A Series + 2 SIS 014711 extensions
@ -2492,7 +2497,7 @@ class TCPDF_STATIC {
/**
* Get page dimensions from format name.
* @param $format (mixed) The format name @see self::$page_format<ul>
* @param mixed $format The format name @see self::$page_format<ul>
* @return array containing page width and height in points
* @since 5.0.010 (2010-05-17)
* @public static
@ -2506,16 +2511,16 @@ class TCPDF_STATIC {
/**
* Set page boundaries.
* @param $page (int) page number
* @param $type (string) valid values are: <ul><li>'MediaBox' : the boundaries of the physical medium on which the page shall be displayed or printed;</li><li>'CropBox' : the visible region of default user space;</li><li>'BleedBox' : the region to which the contents of the page shall be clipped when output in a production environment;</li><li>'TrimBox' : the intended dimensions of the finished page after trimming;</li><li>'ArtBox' : the page's meaningful content (including potential white space).</li></ul>
* @param $llx (float) lower-left x coordinate in user units.
* @param $lly (float) lower-left y coordinate in user units.
* @param $urx (float) upper-right x coordinate in user units.
* @param $ury (float) upper-right y coordinate in user units.
* @param $points (boolean) If true uses user units as unit of measure, otherwise uses PDF points.
* @param $k (float) Scale factor (number of points in user unit).
* @param $pagedim (array) Array of page dimensions.
* @return pagedim array of page dimensions.
* @param int $page page number
* @param string $type valid values are: <ul><li>'MediaBox' : the boundaries of the physical medium on which the page shall be displayed or printed;</li><li>'CropBox' : the visible region of default user space;</li><li>'BleedBox' : the region to which the contents of the page shall be clipped when output in a production environment;</li><li>'TrimBox' : the intended dimensions of the finished page after trimming;</li><li>'ArtBox' : the page's meaningful content (including potential white space).</li></ul>
* @param float $llx lower-left x coordinate in user units.
* @param float $lly lower-left y coordinate in user units.
* @param float $urx upper-right x coordinate in user units.
* @param float $ury upper-right y coordinate in user units.
* @param boolean $points If true uses user units as unit of measure, otherwise uses PDF points.
* @param float $k Scale factor (number of points in user unit).
* @param array $pagedim Array of page dimensions.
* @return array pagedim array of page dimensions.
* @since 5.0.010 (2010-05-17)
* @public static
*/
@ -2539,9 +2544,9 @@ class TCPDF_STATIC {
/**
* Swap X and Y coordinates of page boxes (change page boxes orientation).
* @param $page (int) page number
* @param $pagedim (array) Array of page dimensions.
* @return pagedim array of page dimensions.
* @param int $page page number
* @param array $pagedim Array of page dimensions.
* @return array pagedim array of page dimensions.
* @since 5.0.010 (2010-05-17)
* @public static
*/
@ -2562,8 +2567,8 @@ class TCPDF_STATIC {
/**
* Get the canonical page layout mode.
* @param $layout (string) 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>
* @return (string) Canonical page layout name.
* @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>
* @return string Canonical page layout name.
* @public static
*/
public static function getPageLayoutMode($layout='SinglePage') {
@ -2605,8 +2610,8 @@ class TCPDF_STATIC {
/**
* Get the canonical page layout mode.
* @param $mode (string) 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>
* @return (string) Canonical page mode name.
* @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>
* @return string Canonical page mode name.
* @public static
*/
public static function getPageMode($mode='UseNone') {

2171
tcpdf.php

File diff suppressed because one or more lines are too long

View File

@ -66,8 +66,8 @@ class TCPDFBarcode {
* <li>$arrcode['bcode'][$k]['w'] bar width in units.</li>
* <li>$arrcode['bcode'][$k]['h'] bar height in units.</li>
* <li>$arrcode['bcode'][$k]['p'] bar top position (0 = top, 1 = middle)</li></ul>
* @param $code (string) code to print
* @param $type (string) type of barcode: <ul><li>C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED + CHECKSUM</li><li>C93 : CODE 93 - USS-93</li><li>S25 : Standard 2 of 5</li><li>S25+ : Standard 2 of 5 + CHECKSUM</li><li>I25 : Interleaved 2 of 5</li><li>I25+ : Interleaved 2 of 5 + CHECKSUM</li><li>C128 : CODE 128</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN2 : 2-Digits UPC-Based Extension</li><li>EAN5 : 5-Digits UPC-Based Extension</li><li>EAN8 : EAN 8</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>UPCE : UPC-E</li><li>MSI : MSI (Variation of Plessey code)</li><li>MSI+ : MSI + CHECKSUM (modulo 11)</li><li>POSTNET : POSTNET</li><li>PLANET : PLANET</li><li>RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)</li><li>KIX : KIX (Klant index - Customer index)</li><li>IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200</li><li>CODABAR : CODABAR</li><li>CODE11 : CODE 11</li><li>PHARMA : PHARMACODE</li><li>PHARMA2T : PHARMACODE TWO-TRACKS</li></ul>
* @param string $code code to print
* @param string $type type of barcode: <ul><li>C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED + CHECKSUM</li><li>C93 : CODE 93 - USS-93</li><li>S25 : Standard 2 of 5</li><li>S25+ : Standard 2 of 5 + CHECKSUM</li><li>I25 : Interleaved 2 of 5</li><li>I25+ : Interleaved 2 of 5 + CHECKSUM</li><li>C128 : CODE 128</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN2 : 2-Digits UPC-Based Extension</li><li>EAN5 : 5-Digits UPC-Based Extension</li><li>EAN8 : EAN 8</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>UPCE : UPC-E</li><li>MSI : MSI (Variation of Plessey code)</li><li>MSI+ : MSI + CHECKSUM (modulo 11)</li><li>POSTNET : POSTNET</li><li>PLANET : PLANET</li><li>RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)</li><li>KIX : KIX (Klant index - Customer index)</li><li>IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200</li><li>CODABAR : CODABAR</li><li>CODE11 : CODE 11</li><li>PHARMA : PHARMACODE</li><li>PHARMA2T : PHARMACODE TWO-TRACKS</li></ul>
* @public
*/
public function __construct($code, $type) {
@ -85,9 +85,9 @@ class TCPDFBarcode {
/**
* Send barcode as SVG image object to the standard output.
* @param $w (int) Minimum width of a single bar in user units.
* @param $h (int) Height of barcode in user units.
* @param $color (string) Foreground color (in SVG format) for bar elements (background is transparent).
* @param int $w Minimum width of a single bar in user units.
* @param int $h Height of barcode in user units.
* @param string $color Foreground color (in SVG format) for bar elements (background is transparent).
* @public
*/
public function getBarcodeSVG($w=2, $h=30, $color='black') {
@ -105,9 +105,9 @@ class TCPDFBarcode {
/**
* Return a SVG string representation of barcode.
* @param $w (int) Minimum width of a single bar in user units.
* @param $h (int) Height of barcode in user units.
* @param $color (string) Foreground color (in SVG format) for bar elements (background is transparent).
* @param int $w Minimum width of a single bar in user units.
* @param int $h Height of barcode in user units.
* @param string $color Foreground color (in SVG format) for bar elements (background is transparent).
* @return string SVG code.
* @public
*/
@ -138,9 +138,9 @@ class TCPDFBarcode {
/**
* Return an HTML representation of barcode.
* @param $w (int) Width of a single bar element in pixels.
* @param $h (int) Height of a single bar element in pixels.
* @param $color (string) Foreground color for bar elements (background is transparent).
* @param int $w Width of a single bar element in pixels.
* @param int $h Height of a single bar element in pixels.
* @param string $color Foreground color for bar elements (background is transparent).
* @return string HTML code.
* @public
*/
@ -164,9 +164,9 @@ class TCPDFBarcode {
/**
* Send a PNG image representation of barcode (requires GD or Imagick library).
* @param $w (int) Width of a single bar element in pixels.
* @param $h (int) Height of a single bar element in pixels.
* @param $color (array) RGB (0-255) foreground color for bar elements (background is transparent).
* @param int $w Width of a single bar element in pixels.
* @param int $h Height of a single bar element in pixels.
* @param array $color RGB (0-255) foreground color for bar elements (background is transparent).
* @public
*/
public function getBarcodePNG($w=2, $h=30, $color=array(0,0,0)) {
@ -183,10 +183,10 @@ class TCPDFBarcode {
/**
* Return a PNG image representation of barcode (requires GD or Imagick library).
* @param $w (int) Width of a single bar element in pixels.
* @param $h (int) Height of a single bar element in pixels.
* @param $color (array) RGB (0-255) foreground color for bar elements (background is transparent).
* @return image or false in case of error.
* @param int $w Width of a single bar element in pixels.
* @param int $h Height of a single bar element in pixels.
* @param array $color RGB (0-255) foreground color for bar elements (background is transparent).
* @return string|Imagick|false image or false in case of error.
* @public
*/
public function getBarcodePngData($w=2, $h=30, $color=array(0,0,0)) {
@ -241,8 +241,8 @@ class TCPDFBarcode {
/**
* Set the barcode.
* @param $code (string) code to print
* @param $type (string) type of barcode: <ul><li>C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED + CHECKSUM</li><li>C93 : CODE 93 - USS-93</li><li>S25 : Standard 2 of 5</li><li>S25+ : Standard 2 of 5 + CHECKSUM</li><li>I25 : Interleaved 2 of 5</li><li>I25+ : Interleaved 2 of 5 + CHECKSUM</li><li>C128 : CODE 128</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN2 : 2-Digits UPC-Based Extension</li><li>EAN5 : 5-Digits UPC-Based Extension</li><li>EAN8 : EAN 8</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>UPCE : UPC-E</li><li>MSI : MSI (Variation of Plessey code)</li><li>MSI+ : MSI + CHECKSUM (modulo 11)</li><li>POSTNET : POSTNET</li><li>PLANET : PLANET</li><li>RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)</li><li>KIX : KIX (Klant index - Customer index)</li><li>IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200</li><li>IMBPRE: Pre-processed Intelligent Mail Barcode - Onecode - USPS-B-3200, using only F,A,D,T letters</li><li>CODABAR : CODABAR</li><li>CODE11 : CODE 11</li><li>PHARMA : PHARMACODE</li><li>PHARMA2T : PHARMACODE TWO-TRACKS</li></ul>
* @param string $code code to print
* @param string $type type of barcode: <ul><li>C39 : CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.</li><li>C39+ : CODE 39 with checksum</li><li>C39E : CODE 39 EXTENDED</li><li>C39E+ : CODE 39 EXTENDED + CHECKSUM</li><li>C93 : CODE 93 - USS-93</li><li>S25 : Standard 2 of 5</li><li>S25+ : Standard 2 of 5 + CHECKSUM</li><li>I25 : Interleaved 2 of 5</li><li>I25+ : Interleaved 2 of 5 + CHECKSUM</li><li>C128 : CODE 128</li><li>C128A : CODE 128 A</li><li>C128B : CODE 128 B</li><li>C128C : CODE 128 C</li><li>EAN2 : 2-Digits UPC-Based Extension</li><li>EAN5 : 5-Digits UPC-Based Extension</li><li>EAN8 : EAN 8</li><li>EAN13 : EAN 13</li><li>UPCA : UPC-A</li><li>UPCE : UPC-E</li><li>MSI : MSI (Variation of Plessey code)</li><li>MSI+ : MSI + CHECKSUM (modulo 11)</li><li>POSTNET : POSTNET</li><li>PLANET : PLANET</li><li>RMS4CC : RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)</li><li>KIX : KIX (Klant index - Customer index)</li><li>IMB: Intelligent Mail Barcode - Onecode - USPS-B-3200</li><li>IMBPRE: Pre-processed Intelligent Mail Barcode - Onecode - USPS-B-3200, using only F,A,D,T letters</li><li>CODABAR : CODABAR</li><li>CODE11 : CODE 11</li><li>PHARMA : PHARMACODE</li><li>PHARMA2T : PHARMACODE TWO-TRACKS</li></ul>
* @return array barcode array
* @public
*/
@ -384,9 +384,9 @@ class TCPDFBarcode {
/**
* CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.
* General-purpose code in very wide use world-wide
* @param $code (string) code to represent.
* @param $extended (boolean) if true uses the extended mode.
* @param $checksum (boolean) if true add a checksum to the code.
* @param string $code code to represent.
* @param boolean $extended if true uses the extended mode.
* @param boolean $checksum if true add a checksum to the code.
* @return array barcode representation.
* @protected
*/
@ -479,8 +479,8 @@ class TCPDFBarcode {
/**
* Encode a string to be used for CODE 39 Extended mode.
* @param $code (string) code to represent.
* @return encoded string.
* @param string $code code to represent.
* @return string encoded string.
* @protected
*/
protected function encode_code39_ext($code) {
@ -530,8 +530,8 @@ class TCPDFBarcode {
/**
* Calculate CODE 39 checksum (modulo 43).
* @param $code (string) code to represent.
* @return char checksum.
* @param string $code code to represent.
* @return string char checksum.
* @protected
*/
protected function checksum_code39($code) {
@ -553,7 +553,7 @@ class TCPDFBarcode {
/**
* CODE 93 - USS-93
* Compact code similar to Code 39
* @param $code (string) code to represent.
* @param string $code code to represent.
* @return array barcode representation.
* @protected
*/
@ -681,7 +681,7 @@ class TCPDFBarcode {
/**
* Calculate CODE 93 checksum (modulo 47).
* @param $code (string) code to represent.
* @param string $code code to represent.
* @return string checksum code.
* @protected
*/
@ -730,7 +730,7 @@ class TCPDFBarcode {
/**
* Checksum for standard 2 of 5 barcodes.
* @param $code (string) code to process.
* @param string $code code to process.
* @return int checksum.
* @protected
*/
@ -755,8 +755,8 @@ class TCPDFBarcode {
* MSI.
* Variation of Plessey code, with similar applications
* Contains digits (0 to 9) and encodes the data only in the width of bars.
* @param $code (string) code to represent.
* @param $checksum (boolean) if true add a checksum to the code (modulo 11)
* @param string $code code to represent.
* @param boolean $checksum if true add a checksum to the code (modulo 11)
* @return array barcode representation.
* @protected
*/
@ -814,8 +814,8 @@ class TCPDFBarcode {
* Standard 2 of 5 barcodes.
* Used in airline ticket marking, photofinishing
* Contains digits (0 to 9) and encodes the data only in the width of bars.
* @param $code (string) code to represent.
* @param $checksum (boolean) if true add a checksum to the code
* @param string $code code to represent.
* @param boolean $checksum if true add a checksum to the code
* @return array barcode representation.
* @protected
*/
@ -854,10 +854,9 @@ class TCPDFBarcode {
}
/**
* Convert binary barcode sequence to TCPDF barcode array.
* @param $seq (string) barcode as binary sequence.
* @param $bararray (array) barcode array.
* òparam array $bararray TCPDF barcode array to fill up
* Convert binary barcode sequence to WarnockPDF barcode array.
* @param string $seq barcode as binary sequence.
* @param array $bararray barcode array to fill up
* @return array barcode representation.
* @protected
*/
@ -886,8 +885,8 @@ class TCPDFBarcode {
* Interleaved 2 of 5 barcodes.
* Compact numeric code, widely used in industry, air cargo
* Contains digits (0 to 9) and encodes the data in the width of both bars and spaces.
* @param $code (string) code to represent.
* @param $checksum (boolean) if true add a checksum to the code
* @param string $code code to represent.
* @param boolean $checksum if true add a checksum to the code
* @return array barcode representation.
* @protected
*/
@ -950,8 +949,8 @@ class TCPDFBarcode {
/**
* C128 barcodes.
* Very capable code, excellent density, high reliability; in very wide use world-wide
* @param $code (string) code to represent.
* @param $type (string) barcode type: A, B, C or empty for automatic switch (AUTO mode)
* @param string $code code to represent.
* @param string $type barcode type: A, B, C or empty for automatic switch (AUTO mode)
* @return array barcode representation.
* @protected
*/
@ -1281,7 +1280,7 @@ class TCPDFBarcode {
/**
* Split text code in A/B sequence for 128 code
* @param $code (string) code to split.
* @param string $code code to split.
* @return array sequence
* @protected
*/
@ -1319,8 +1318,8 @@ class TCPDFBarcode {
* EAN13: European Article Numbering international retail product code
* UPC-A: Universal product code seen on almost all retail products in the USA and Canada
* UPC-E: Short version of UPC symbol
* @param $code (string) code to represent.
* @param $len (string) barcode type: 6 = UPC-E, 8 = EAN8, 13 = EAN13, 12 = UPC-A
* @param string $code code to represent.
* @param string $len barcode type: 6 = UPC-E, 8 = EAN8, 13 = EAN13, 12 = UPC-A
* @return array barcode representation.
* @protected
*/
@ -1512,8 +1511,8 @@ class TCPDFBarcode {
* UPC-Based Extensions
* 2-Digit Ext.: Used to indicate magazines and newspaper issue numbers
* 5-Digit Ext.: Used to mark suggested retail price of books
* @param $code (string) code to represent.
* @param $len (string) barcode type: 2 = 2-Digit, 5 = 5-Digit
* @param string $code code to represent.
* @param string $len barcode type: 2 = 2-Digit, 5 = 5-Digit
* @return array barcode representation.
* @protected
*/
@ -1587,8 +1586,8 @@ class TCPDFBarcode {
/**
* POSTNET and PLANET barcodes.
* Used by U.S. Postal Service for automated mail sorting
* @param $code (string) zip code to represent. Must be a string containing a zip code of the form DDDDD or DDDDD-DDDD.
* @param $planet (boolean) if true print the PLANET barcode, otherwise print POSTNET
* @param string $code zip code to represent. Must be a string containing a zip code of the form DDDDD or DDDDD-DDDD.
* @param boolean $planet if true print the PLANET barcode, otherwise print POSTNET
* @return array barcode representation.
* @protected
*/
@ -1660,8 +1659,8 @@ class TCPDFBarcode {
* RMS4CC - CBC - KIX
* RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code) - KIX (Klant index - Customer index)
* RM4SCC is the name of the barcode symbology used by the Royal Mail for its Cleanmail service.
* @param $code (string) code to print
* @param $kix (boolean) if true prints the KIX variation (doesn't use the start and end symbols, and the checksum) - in this case the house number must be sufficed with an X and placed at the end of the code.
* @param string $code code to print
* @param boolean $kix if true prints the KIX variation (doesn't use the start and end symbols, and the checksum) - in this case the house number must be sufficed with an X and placed at the end of the code.
* @return array barcode representation.
* @protected
*/
@ -1812,7 +1811,7 @@ class TCPDFBarcode {
/**
* CODABAR barcodes.
* Older code often used in library systems, sometimes in blood banks
* @param $code (string) code to represent.
* @param string $code code to represent.
* @return array barcode representation.
* @protected
*/
@ -1868,7 +1867,7 @@ class TCPDFBarcode {
/**
* CODE11 barcodes.
* Used primarily for labeling telecommunications equipment
* @param $code (string) code to represent.
* @param string $code code to represent.
* @return array barcode representation.
* @protected
*/
@ -1959,7 +1958,7 @@ class TCPDFBarcode {
/**
* Pharmacode
* Contains digits (0 to 9)
* @param $code (string) code to represent.
* @param string $code code to represent.
* @return array barcode representation.
* @protected
*/
@ -1985,7 +1984,7 @@ class TCPDFBarcode {
/**
* Pharmacode two-track
* Contains digits (0 to 9)
* @param $code (string) code to represent.
* @param string $code code to represent.
* @return array barcode representation.
* @protected
*/
@ -2047,7 +2046,7 @@ class TCPDFBarcode {
* (requires PHP bcmath extension)
* Intelligent Mail barcode is a 65-bar code for use on mail in the United States.
* The fields are described as follows:<ul><li>The Barcode Identifier shall be assigned by USPS to encode the presort identification that is currently printed in human readable form on the optional endorsement line (OEL) as well as for future USPS use. This shall be two digits, with the second digit in the range of 04. The allowable encoding ranges shall be 0004, 1014, 2024, 3034, 4044, 5054, 6064, 7074, 8084, and 9094.</li><li>The Service Type Identifier shall be assigned by USPS for any combination of services requested on the mailpiece. The allowable encoding range shall be 000http://it2.php.net/manual/en/function.dechex.php999. Each 3-digit value shall correspond to a particular mail class with a particular combination of service(s). Each service program, such as OneCode Confirm and OneCode ACS, shall provide the list of Service Type Identifier values.</li><li>The Mailer or Customer Identifier shall be assigned by USPS as a unique, 6 or 9 digit number that identifies a business entity. The allowable encoding range for the 6 digit Mailer ID shall be 000000- 899999, while the allowable encoding range for the 9 digit Mailer ID shall be 900000000-999999999.</li><li>The Serial or Sequence Number shall be assigned by the mailer for uniquely identifying and tracking mailpieces. The allowable encoding range shall be 000000000999999999 when used with a 6 digit Mailer ID and 000000-999999 when used with a 9 digit Mailer ID. e. The Delivery Point ZIP Code shall be assigned by the mailer for routing the mailpiece. This shall replace POSTNET for routing the mailpiece to its final delivery point. The length may be 0, 5, 9, or 11 digits. The allowable encoding ranges shall be no ZIP Code, 0000099999, 000000000999999999, and 0000000000099999999999.</li></ul>
* @param $code (string) code to print, separate the ZIP (routing code) from the rest using a minus char '-' (BarcodeID_ServiceTypeID_MailerID_SerialNumber-RoutingCode)
* @param string $code code to print, separate the ZIP (routing code) from the rest using a minus char '-' (BarcodeID_ServiceTypeID_MailerID_SerialNumber-RoutingCode)
* @return array barcode representation.
* @protected
*/
@ -2171,8 +2170,8 @@ class TCPDFBarcode {
/**
* IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200
*
* @param $code (string) pre-formatted IMB barcode (65 chars "FADT")
*
* @param string $code pre-formatted IMB barcode (65 chars "FADT")
* @return array barcode representation.
* @protected
*/
@ -2223,7 +2222,7 @@ class TCPDFBarcode {
/**
* Convert large integer number to hexadecimal representation.
* (requires PHP bcmath extension)
* @param $number (string) number to convert specified as a string
* @param string $number number to convert specified as a string
* @return string hexadecimal representation
*/
public function dec_to_hex($number) {
@ -2247,7 +2246,7 @@ class TCPDFBarcode {
/**
* Convert large hexadecimal number to decimal representation (string).
* (requires PHP bcmath extension)
* @param $hex (string) hexadecimal number to convert specified as a string
* @param string $hex hexadecimal number to convert specified as a string
* @return string hexadecimal representation
*/
public function hex_to_dec($hex) {
@ -2263,7 +2262,7 @@ class TCPDFBarcode {
/**
* Intelligent Mail Barcode calculation of Frame Check Sequence
* @param $code_arr (string) array of hexadecimal values (13 bytes holding 102 bits right justified).
* @param string $code_arr array of hexadecimal values (13 bytes holding 102 bits right justified).
* @return int 11 bit Frame Check Sequence as integer (decimal base)
* @protected
*/
@ -2299,7 +2298,7 @@ class TCPDFBarcode {
/**
* Reverse unsigned short value
* @param $num (int) value to reversr
* @param int $num value to reversr
* @return int reversed value
* @protected
*/
@ -2315,8 +2314,8 @@ class TCPDFBarcode {
/**
* generate Nof13 tables used for Intelligent Mail Barcode
* @param $n (int) is the type of table: 2 for 2of13 table, 5 for 5of13table
* @param $size (int) size of table (78 for n=2 and 1287 for n=5)
* @param int $n is the type of table: 2 for 2of13 table, 5 for 5of13table
* @param int $size size of table (78 for n=2 and 1287 for n=5)
* @return array requested table
* @protected
*/

View File

@ -62,8 +62,8 @@ class TCPDF2DBarcode {
* <li>$arrcode['num_rows'] required number of rows</li>
* <li>$arrcode['num_cols'] required number of columns</li>
* <li>$arrcode['bcode'][$r][$c] value of the cell is $r row and $c column (0 = transparent, 1 = black)</li></ul>
* @param $code (string) code to print
* @param $type (string) type of barcode: <ul><li>DATAMATRIX : Datamatrix (ISO/IEC 16022)</li><li>PDF417 : PDF417 (ISO/IEC 15438:2006)</li><li>PDF417,a,e,t,s,f,o0,o1,o2,o3,o4,o5,o6 : PDF417 with parameters: a = aspect ratio (width/height); e = error correction level (0-8); t = total number of macro segments; s = macro segment index (0-99998); f = file ID; o0 = File Name (text); o1 = Segment Count (numeric); o2 = Time Stamp (numeric); o3 = Sender (text); o4 = Addressee (text); o5 = File Size (numeric); o6 = Checksum (numeric). NOTES: Parameters t, s and f are required for a Macro Control Block, all other parametrs are optional. To use a comma character ',' on text options, replace it with the character 255: "\xff".</li><li>QRCODE : QRcode Low error correction</li><li>QRCODE,L : QRcode Low error correction</li><li>QRCODE,M : QRcode Medium error correction</li><li>QRCODE,Q : QRcode Better error correction</li><li>QRCODE,H : QR-CODE Best error correction</li><li>RAW: raw mode - comma-separad list of array rows</li><li>RAW2: raw mode - array rows are surrounded by square parenthesis.</li><li>TEST : Test matrix</li></ul>
* @param string $code code to print
* @param string $type type of barcode: <ul><li>DATAMATRIX : Datamatrix (ISO/IEC 16022)</li><li>PDF417 : PDF417 (ISO/IEC 15438:2006)</li><li>PDF417,a,e,t,s,f,o0,o1,o2,o3,o4,o5,o6 : PDF417 with parameters: a = aspect ratio (width/height); e = error correction level (0-8); t = total number of macro segments; s = macro segment index (0-99998); f = file ID; o0 = File Name (text); o1 = Segment Count (numeric); o2 = Time Stamp (numeric); o3 = Sender (text); o4 = Addressee (text); o5 = File Size (numeric); o6 = Checksum (numeric). NOTES: Parameters t, s and f are required for a Macro Control Block, all other parametrs are optional. To use a comma character ',' on text options, replace it with the character 255: "\xff".</li><li>QRCODE : QRcode Low error correction</li><li>QRCODE,L : QRcode Low error correction</li><li>QRCODE,M : QRcode Medium error correction</li><li>QRCODE,Q : QRcode Better error correction</li><li>QRCODE,H : QR-CODE Best error correction</li><li>RAW: raw mode - comma-separad list of array rows</li><li>RAW2: raw mode - array rows are surrounded by square parenthesis.</li><li>TEST : Test matrix</li></ul>
*/
public function __construct($code, $type) {
$this->setBarcode($code, $type);
@ -79,9 +79,9 @@ class TCPDF2DBarcode {
/**
* Send barcode as SVG image object to the standard output.
* @param $w (int) Width of a single rectangle element in user units.
* @param $h (int) Height of a single rectangle element in user units.
* @param $color (string) Foreground color (in SVG format) for bar elements (background is transparent).
* @param int $w Width of a single rectangle element in user units.
* @param int $h Height of a single rectangle element in user units.
* @param string $color Foreground color (in SVG format) for bar elements (background is transparent).
* @public
*/
public function getBarcodeSVG($w=3, $h=3, $color='black') {
@ -99,9 +99,9 @@ class TCPDF2DBarcode {
/**
* Return a SVG string representation of barcode.
* @param $w (int) Width of a single rectangle element in user units.
* @param $h (int) Height of a single rectangle element in user units.
* @param $color (string) Foreground color (in SVG format) for bar elements (background is transparent).
* @param int $w Width of a single rectangle element in user units.
* @param int $h Height of a single rectangle element in user units.
* @param string $color Foreground color (in SVG format) for bar elements (background is transparent).
* @return string SVG code.
* @public
*/
@ -135,9 +135,9 @@ class TCPDF2DBarcode {
/**
* Return an HTML representation of barcode.
* @param $w (int) Width of a single rectangle element in pixels.
* @param $h (int) Height of a single rectangle element in pixels.
* @param $color (string) Foreground color for bar elements (background is transparent).
* @param int $w Width of a single rectangle element in pixels.
* @param int $h Height of a single rectangle element in pixels.
* @param string $color Foreground color for bar elements (background is transparent).
* @return string HTML code.
* @public
*/
@ -164,9 +164,9 @@ class TCPDF2DBarcode {
/**
* Send a PNG image representation of barcode (requires GD or Imagick library).
* @param $w (int) Width of a single rectangle element in pixels.
* @param $h (int) Height of a single rectangle element in pixels.
* @param $color (array) RGB (0-255) foreground color for bar elements (background is transparent).
* @param int $w Width of a single rectangle element in pixels.
* @param int $h Height of a single rectangle element in pixels.
* @param array $color RGB (0-255) foreground color for bar elements (background is transparent).
* @public
*/
public function getBarcodePNG($w=3, $h=3, $color=array(0,0,0)) {
@ -184,10 +184,10 @@ class TCPDF2DBarcode {
/**
* Return a PNG image representation of barcode (requires GD or Imagick library).
* @param $w (int) Width of a single rectangle element in pixels.
* @param $h (int) Height of a single rectangle element in pixels.
* @param $color (array) RGB (0-255) foreground color for bar elements (background is transparent).
* @return image or false in case of error.
* @param int $w Width of a single rectangle element in pixels.
* @param int $h Height of a single rectangle element in pixels.
* @param array $color RGB (0-255) foreground color for bar elements (background is transparent).
* @return string|Imagick|false image or false in case of error.
* @public
*/
public function getBarcodePngData($w=3, $h=3, $color=array(0,0,0)) {
@ -245,8 +245,8 @@ class TCPDF2DBarcode {
/**
* Set the barcode.
* @param $code (string) code to print
* @param $type (string) type of barcode: <ul><li>DATAMATRIX : Datamatrix (ISO/IEC 16022)</li><li>PDF417 : PDF417 (ISO/IEC 15438:2006)</li><li>PDF417,a,e,t,s,f,o0,o1,o2,o3,o4,o5,o6 : PDF417 with parameters: a = aspect ratio (width/height); e = error correction level (0-8); t = total number of macro segments; s = macro segment index (0-99998); f = file ID; o0 = File Name (text); o1 = Segment Count (numeric); o2 = Time Stamp (numeric); o3 = Sender (text); o4 = Addressee (text); o5 = File Size (numeric); o6 = Checksum (numeric). NOTES: Parameters t, s and f are required for a Macro Control Block, all other parametrs are optional. To use a comma character ',' on text options, replace it with the character 255: "\xff".</li><li>QRCODE : QRcode Low error correction</li><li>QRCODE,L : QRcode Low error correction</li><li>QRCODE,M : QRcode Medium error correction</li><li>QRCODE,Q : QRcode Better error correction</li><li>QRCODE,H : QR-CODE Best error correction</li><li>RAW: raw mode - comma-separad list of array rows</li><li>RAW2: raw mode - array rows are surrounded by square parenthesis.</li><li>TEST : Test matrix</li></ul>
* @param string $code code to print
* @param string $type type of barcode: <ul><li>DATAMATRIX : Datamatrix (ISO/IEC 16022)</li><li>PDF417 : PDF417 (ISO/IEC 15438:2006)</li><li>PDF417,a,e,t,s,f,o0,o1,o2,o3,o4,o5,o6 : PDF417 with parameters: a = aspect ratio (width/height); e = error correction level (0-8); t = total number of macro segments; s = macro segment index (0-99998); f = file ID; o0 = File Name (text); o1 = Segment Count (numeric); o2 = Time Stamp (numeric); o3 = Sender (text); o4 = Addressee (text); o5 = File Size (numeric); o6 = Checksum (numeric). NOTES: Parameters t, s and f are required for a Macro Control Block, all other parametrs are optional. To use a comma character ',' on text options, replace it with the character 255: "\xff".</li><li>QRCODE : QRcode Low error correction</li><li>QRCODE,L : QRcode Low error correction</li><li>QRCODE,M : QRcode Medium error correction</li><li>QRCODE,Q : QRcode Better error correction</li><li>QRCODE,H : QR-CODE Best error correction</li><li>RAW: raw mode - comma-separad list of array rows</li><li>RAW2: raw mode - array rows are surrounded by square parenthesis.</li><li>TEST : Test matrix</li></ul>
* @return array
*/
public function setBarcode($code, $type) {

View File

@ -60,7 +60,7 @@ class TCPDF_IMPORT extends TCPDF {
/**
* Import an existing PDF document
* @param $filename (string) Filename of the PDF document to import.
* @param string $filename Filename of the PDF document to import.
* @return true in case of success, false otherwise
* @public
* @since 1.0.000 (2011-05-24)

View File

@ -91,8 +91,8 @@ class TCPDF_PARSER {
/**
* Parse a PDF document an return an array of objects.
* @param $data (string) PDF data to parse.
* @param $cfg (array) Array of configuration parameters:
* @param string $data PDF data to parse.
* @param array $cfg Array of configuration parameters:
* 'die_for_errors' : if true termitate the program execution in case of error, otherwise thows an exception;
* 'ignore_filter_decoding_errors' : if true ignore filter decoding errors;
* 'ignore_missing_filter_decoders' : if true ignore missing filter decoding errors.
@ -130,7 +130,7 @@ class TCPDF_PARSER {
/**
* Set the configuration parameters.
* @param $cfg (array) Array of configuration parameters:
* @param array $cfg Array of configuration parameters:
* 'die_for_errors' : if true termitate the program execution in case of error, otherwise thows an exception;
* 'ignore_filter_decoding_errors' : if true ignore filter decoding errors;
* 'ignore_missing_filter_decoders' : if true ignore missing filter decoding errors.
@ -150,7 +150,7 @@ class TCPDF_PARSER {
/**
* Return an array of parsed PDF document objects.
* @return (array) Array of parsed PDF document objects.
* @return array Array of parsed PDF document objects.
* @public
* @since 1.0.000 (2011-06-26)
*/
@ -160,8 +160,8 @@ class TCPDF_PARSER {
/**
* Get Cross-Reference (xref) table and trailer data from PDF document data.
* @param $offset (int) xref offset (if know).
* @param $xref (array) previous xref array (if any).
* @param int $offset xref offset (if know).
* @param array $xref previous xref array (if any).
* @return Array containing xref and trailer data.
* @protected
* @since 1.0.000 (2011-05-24)
@ -202,8 +202,8 @@ class TCPDF_PARSER {
/**
* Decode the Cross-Reference section
* @param $startxref (int) Offset at which the xref section starts (position of the 'xref' keyword).
* @param $xref (array) Previous xref array (if any).
* @param int $startxref Offset at which the xref section starts (position of the 'xref' keyword).
* @param array $xref Previous xref array (if any).
* @return Array containing xref and trailer data.
* @protected
* @since 1.0.000 (2011-06-20)
@ -274,8 +274,8 @@ class TCPDF_PARSER {
/**
* Decode the Cross-Reference Stream section
* @param $startxref (int) Offset at which the xref section starts.
* @param $xref (array) Previous xref array (if any).
* @param int $startxref Offset at which the xref section starts.
* @param array $xref Previous xref array (if any).
* @return Array containing xref and trailer data.
* @protected
* @since 1.0.003 (2013-03-16)
@ -489,7 +489,7 @@ class TCPDF_PARSER {
/**
* Get object type, raw value and offset to next object
* @param $offset (int) Object offset.
* @param int $offset Object offset.
* @return array containing object type, raw value and offset to next object
* @protected
* @since 1.0.000 (2011-06-20)
@ -667,9 +667,9 @@ class TCPDF_PARSER {
/**
* Get content of indirect object.
* @param $obj_ref (string) Object number and generation number separated by underscore character.
* @param $offset (int) Object offset.
* @param $decoding (boolean) If true decode streams.
* @param string $obj_ref Object number and generation number separated by underscore character.
* @param int $offset Object offset.
* @param boolean $decoding If true decode streams.
* @return array containing object data.
* @protected
* @since 1.0.000 (2011-05-24)
@ -712,7 +712,7 @@ class TCPDF_PARSER {
/**
* Get the content of object, resolving indect object reference if necessary.
* @param $obj (string) Object value.
* @param string $obj Object value.
* @return array containing object data.
* @protected
* @since 1.0.000 (2011-06-26)
@ -734,8 +734,8 @@ class TCPDF_PARSER {
/**
* Decode the specified stream.
* @param $sdic (array) Stream's dictionary array.
* @param $stream (string) Stream to decode.
* @param array $sdic Stream's dictionary array.
* @param string $stream Stream to decode.
* @return array containing decoded stream data and remaining filters.
* @protected
* @since 1.0.000 (2011-06-22)
@ -796,7 +796,7 @@ class TCPDF_PARSER {
/**
* Throw an exception or print an error message and die if the K_TCPDF_PARSER_THROW_EXCEPTION_ERROR constant is set to true.
* @param $msg (string) The error message
* @param string $msg The error message
* @public
* @since 1.0.000 (2011-05-23)
*/