InvoiceRepository
in package
implements
InvoiceRepositoryInterface
Class InvoiceRepository
Tags
Interfaces, Classes and Traits
- InvoiceRepositoryInterface
- Interface InvoiceRepositoryInterface
Table of Contents
- $db : CI_DB_query_builder
- $tableName : string
- __construct() : mixed
- InvoiceRepository constructor.
- add() : int
- Adds a new invoice in the database.
- deleteByInvoiceId() : $this|InvoiceRepository
- Removes an invoice entry from the database.
- updateInvoiceFilename() : $this|InvoiceRepository
- Updates the invoice file column for an invoice entry in the database.
Properties
$db
protected
CI_DB_query_builder
$db
$tableName
protected
string
$tableName
= 'invoices'
Methods
__construct()
InvoiceRepository constructor.
public
__construct(CI_DB_query_builder $db) : mixed
Parameters
- $db : CI_DB_query_builder
Return values
mixed —add()
Adds a new invoice in the database.
public
add(InvoiceInformation $invoiceInfo) : int
Parameters
- $invoiceInfo : InvoiceInformation
-
Entity with invoice information.
Return values
int —The invoice_id of the new database entry.
deleteByInvoiceId()
Removes an invoice entry from the database.
public
deleteByInvoiceId(IdType $invoiceId) : $this|InvoiceRepository
Parameters
- $invoiceId : IdType
-
invoice_id of entry to be removed.
Return values
$this|InvoiceRepository —Same instance for chained method calls.
updateInvoiceFilename()
Updates the invoice file column for an invoice entry in the database.
public
updateInvoiceFilename(IdType $invoiceId, FilenameStringType $invoiceFilename) : $this|InvoiceRepository
Parameters
- $invoiceId : IdType
- $invoiceFilename : FilenameStringType
Return values
$this|InvoiceRepository —Same instance for chained method calls.