public
|
#
__construct( )
Loads the language to be used for this invoice
Loads the language to be used for this invoice
|
public
|
#
setMeta( array $meta )
Sets the meta data to use for this invoice. This method is invoked after
__construct() but before makeDocument()
Sets the meta data to use for this invoice. This method is invoked after
__construct() but before makeDocument()
Parameters
- $meta
array $meta An array of meta data including: - background The absolute path to the
background graphic - logo The absolute path to the logo graphic - company_name
The name of the company - company_address The address of the company - terms The
terms to display on this invoice - paper_size The size of paper to use (e.g.
"A4" or "Letter") - tax An array of tax info including: - tax_id The Tax
ID/VATIN of this company - cascade_tax Whether or not taxes are cascading -
language The language of the definitions to set for this document
|
public
|
#
includeAddress( boolean $include_address = true )
Sets whether the to address should be included in the invoice
Sets whether the to address should be included in the invoice
Parameters
- $include_address
boolean $include_address True to include the to address information, false to leave the
information off of the document
|
public
|
#
setCurrency( CurrencyFormat $currency_format )
Sets the CurrencyFormat object for parsing currency values
Sets the CurrencyFormat object for parsing currency values
Parameters
- $currency_format
CurrencyFormat
$currency_format The CurrencyFormat object
|
public
|
#
setDate( Date $date )
Sets the Date object for parsing date values
Sets the Date object for parsing date values
Parameters
- $date
Date
$date The Date object
Overrides
|
public
|
#
setMimeType( string $mime_type )
Sets the MIME type to be used when fetching and streaming this invoice.
Called after __construct()
Sets the MIME type to be used when fetching and streaming this invoice.
Called after __construct()
Parameters
- $mime_type
string $mime_type The mime_type to render ("application/pdf", "text/html", etc.)
|
public
|
#
supportedMimeTypes( )
Returns the MIME types that this template supports for output
Returns the MIME types that this template supports for output
|
public
string
|
#
getFileExtension( string $mime_type )
Returns the file extension for the given (supported) mime type
Returns the file extension for the given (supported) mime type
Parameters
- $mime_type
string $mime_type The mime_type to fetch the extension of
Returns
string The extension to use for the given mime type
|
public
|
#
getName( )
Returns the name of this invoice PDF template
Returns the name of this invoice PDF template
|
public
string
|
#
getVersion( )
Returns the version of this invoice PDF template
Returns the version of this invoice PDF template
Returns
string The current version of this invoice PDF template
|
public
array
|
#
getAuthors( )
Returns the name and URL for the authors of this invoice PDF template
Returns the name and URL for the authors of this invoice PDF template
Returns
array The name and URL of the authors of this invoice PDF template
|
public
|
#
makeDocument( array $invoice_data )
Generates one or more invoices for a single document
Generates one or more invoices for a single document
Parameters
- $invoice_data
array $invoice_data An numerically indexed array of stdClass objects each representing
an invoice
|
public
string
|
#
fetch( )
Returns the invoice document in the desired format
Returns the invoice document in the desired format
Returns
string The PDF document in binary format
|
public
|
#
stream( string $name = null )
Outputs the Invoice document to stdout, sending the apporpriate headers to
render the document inline
Outputs the Invoice document to stdout, sending the apporpriate headers to
render the document inline
Parameters
- $name
string $name The name for the document minus the extension (optional)
Throws
Exception
Thrown when the MIME type is not supported by the template
|
public
|
#
download( string $name = null )
Outputs the Invoice document to stdout, sending the appropriate headers to
force a download of the document
Outputs the Invoice document to stdout, sending the appropriate headers to
force a download of the document
Parameters
- $name
string $name The name for the document minus the extension (optional)
Throws
Exception
Thrown when the MIME type is not supported by the template
|