PHP Class MYPDF

Inheritance: extends TCPDF
Afficher le fichier Open project: kimai/kimai Class Usage Examples

Méthodes publiques

Свойство Type Description
$columns
$moneySum
$print_time
$timeSum
$w Widths of all columns

Méthodes publiques

Méthode Description
ColoredTable ( array $header, array $data ) Print the table containing the detailed information.
Footer ( ) Print a footer on every page.
columnWidths ( integer $max_time_width, $max_money_width ) : array Create the array which hold the column widths. They depends on the maximum with the time column and the money column need.
getHtmlStringLines ( string $string, integer $line_width ) : integer Split the string in lines and check if a line would overflow and cause more lines.
printExpenseRow ( array $w, array $row ) Put a new expense entry into the PDF document.
printRows ( array $data, array $widths ) Put a new entry into the PDF document. Decide if it's a time entry or expense entry and call the appropriate functions.
printTimeRow ( array $w, array $row ) Put a new time entry into the PDF document.

Method Details

ColoredTable() public méthode

Print the table containing the detailed information.
public ColoredTable ( array $header, array $data )
$header array String with the column headers.
$data array Data to print.

columnWidths() public méthode

Create the array which hold the column widths. They depends on the maximum with the time column and the money column need.
public columnWidths ( integer $max_time_width, $max_money_width ) : array
$max_time_width integer maximum width the time column needs.
Résultat array containing the widths of the columns

getHtmlStringLines() public méthode

Split the string in lines and check if a line would overflow and cause more lines.
public getHtmlStringLines ( string $string, integer $line_width ) : integer
$string string Text to check.
$line_width integer
Résultat integer Number of lines the text will need.

printExpenseRow() public méthode

Put a new expense entry into the PDF document.
public printExpenseRow ( array $w, array $row )
$w array the widths of the columns
$row array the data of this entry

printRows() public méthode

Put a new entry into the PDF document. Decide if it's a time entry or expense entry and call the appropriate functions.
public printRows ( array $data, array $widths )
$data array the data of this entry
$widths array the widths of the columns

printTimeRow() public méthode

Put a new time entry into the PDF document.
public printTimeRow ( array $w, array $row )
$w array the widths of the columns
$row array the data of this entry

Property Details

$columns public_oe property

public $columns

$moneySum public_oe property

public $moneySum

$print_time public_oe property

public $print_time

$timeSum public_oe property

public $timeSum

$w public_oe property

Widths of all columns
public $w