PHP Class BasePDF

Inheritance: extends TCPDF
显示文件 Open project: kimai/kimai

Public Properties

Property Type Description
$date_format
$print_time
$time_format

Public Methods

Method Description
SumStdTime ( string $time1, string $timesum ) : string Add to standard time.
date ( integer $number ) : string Format a unix timestamp as a date string.
dateformat ( integer $number ) : string Format a Unix timestamp to a date.
money ( integer $number ) : string Format a number as a money value.
printHeader ( array $w, array $header ) Print a header of the summarization table.
printSummary ( array $header, array $data ) Print the table containing the summarized information.
summarize ( $orderedExportData ) Create the summary data array.
time ( integer $number ) : string Format a unix timestamp as a time string.
timeLength ( integer $duration ) : string Calculate time in hh:mm from duration lenght in second rounded to minutes.
time_unit ( string $time ) : string Appen the time unit.
timespan ( integer $number ) : string Format the duration.

Method Details

SumStdTime() public method

Add to standard time.
public SumStdTime ( string $time1, string $timesum ) : string
$time1 string , time to add to the duration time (usually in standard hours:minutes)
$timesum string , total duration in standard time
return string added timesum+time in standard time

date() public method

Format a unix timestamp as a date string.
public date ( integer $number ) : string
$number integer unix timestamp
return string formatted string

dateformat() public method

Format a Unix timestamp to a date.
public dateformat ( integer $number ) : string
$number integer unix timestamp
return string formatted as date

money() public method

Format a number as a money value.
public money ( integer $number ) : string
$number integer amount of money
return string formatted string

printHeader() public method

Print a header of the summarization table.
public printHeader ( array $w, array $header )
$w array widths of the columns
$header array name of the column headers

printSummary() public method

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

summarize() public method

Create the summary data array.
public summarize ( $orderedExportData )

time() public method

Format a unix timestamp as a time string.
public time ( integer $number ) : string
$number integer unix timestamp
return string formatted string

timeLength() public method

Calculate time in hh:mm from duration lenght in second rounded to minutes.
public timeLength ( integer $duration ) : string
$duration integer lenght in second
return string time in format hh:mm

time_unit() public method

Appen the time unit.
public time_unit ( string $time ) : string
$time string
return string $time + time_unit

timespan() public method

Format the duration.
public timespan ( integer $number ) : string
$number integer number to format (usually in hours)
return string formatted string

Property Details

$date_format public_oe property

public $date_format

$print_time public_oe property

public $print_time

$time_format public_oe property

public $time_format