PHP Класс MYPDF

Наследование: extends TCPDF
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$columns
$moneySum
$print_time
$timeSum
$w Widths of all columns

Открытые методы

Метод Описание
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.

Описание методов

ColoredTable() публичный Метод

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() публичный Метод

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.
Результат array containing the widths of the columns

getHtmlStringLines() публичный Метод

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
Результат integer Number of lines the text will need.

printExpenseRow() публичный Метод

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() публичный Метод

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() публичный Метод

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

Описание свойств

$columns публичное свойство

public $columns

$moneySum публичное свойство

public $moneySum

$print_time публичное свойство

public $print_time

$timeSum публичное свойство

public $timeSum

$w публичное свойство

Widths of all columns
public $w