PHP Class MYPDF

Inheritance: extends TCPDF
Mostra file Open project: kimai/kimai Class Usage Examples

Public Properties

Property Type Description
$columns
$moneySum
$print_time
$timeSum
$w Widths of all columns

Public Methods

Method 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 method

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 method

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.
return array containing the widths of the columns

getHtmlStringLines() public method

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
return integer Number of lines the text will need.

printExpenseRow() public method

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 method

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 method

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