VatRateHistoryRepository
extends AbstractRepository
in package
FinalYes
Table of Contents
Properties
- $all : array<string|int, VatRateHistory>|null
- $countryAssoc : array<string|int, array<string|int, VatRateHistory>>|null
- $latestCountryAssoc : array<string|int, VatRateHistory>|null
- $latestCountryVatTypeRateAssoc : array<string|int, array<string|int, string|null>>
Methods
- __construct() : mixed
- delete() : void
- deleteList() : void
- fetchAllAsAssocArray() : mixed
- findAll() : array<string|int, VatRateHistory>|null
- findByCountry() : array<string|int, VatRateHistory>
- findByCountryAndDate() : VatRateHistory|null
- flush() : void
- getCountryAssoc() : array<string|int, array<string|int, VatRateHistory>>
- getLatestCountryAssoc() : array<string|int, VatRateHistory>
- getLatestCountryVatTypeRateAssoc() : array<string|int, array<string|int, string|null>>
- getOrThrow() : mixed
- getStandardVatRateHistoryListByCountry() : mixed
- getVatTypeByCountryDateAndRate() : VatRateHistory|null
- insert() : void
- insertList() : void
- merge() : object
- persist() : void
- remove() : void
- update() : void
- updateList() : void
- getNativeSqlWithParameters() : mixed
- code mostly copied from doctrine private methods
- historyItemToVatTypeIdRateAssoc() : mixed
- loadAll() : void
- loadCountryAssoc() : void
- loadLatestCountryAssoc() : mixed
- loadLatestCountryVatTypeRateAssoc() : mixed
Properties
$all
private
array<string|int, VatRateHistory>|null
$all
$countryAssoc
private
array<string|int, array<string|int, VatRateHistory>>|null
$countryAssoc
$latestCountryAssoc
private
array<string|int, VatRateHistory>|null
$latestCountryAssoc
$latestCountryVatTypeRateAssoc
private
array<string|int, array<string|int, string|null>>
$latestCountryVatTypeRateAssoc
rates as string decimals
Methods
__construct()
public
__construct(EntityManager $entityManager) : mixed
Parameters
- $entityManager : EntityManager
delete()
public
delete(object $entity) : void
Parameters
- $entity : object
Tags
deleteList()
public
deleteList(array<string|int, object> $entities) : void
Parameters
- $entities : array<string|int, object>
Tags
fetchAllAsAssocArray()
public
fetchAllAsAssocArray(mixed $key) : mixed
Parameters
- $key : mixed
findAll()
public
findAll() : array<string|int, VatRateHistory>|null
Return values
array<string|int, VatRateHistory>|nullfindByCountry()
public
findByCountry(Country|int|string $country) : array<string|int, VatRateHistory>
Parameters
- $country : Country|int|string
-
The country model, the id or the ISO 3166-1 alpha-2 code of the country
Return values
array<string|int, VatRateHistory>findByCountryAndDate()
public
findByCountryAndDate(Country|int|string $country, DateTime|string $date) : VatRateHistory|null
Parameters
- $country : Country|int|string
-
The country model, the id or the ISO 3166-1 alpha-2 code of the country
- $date : DateTime|string
Return values
VatRateHistory|nullflush()
public
flush() : void
Tags
getCountryAssoc()
public
getCountryAssoc() : array<string|int, array<string|int, VatRateHistory>>
Return values
array<string|int, array<string|int, VatRateHistory>>getLatestCountryAssoc()
public
getLatestCountryAssoc() : array<string|int, VatRateHistory>
Return values
array<string|int, VatRateHistory>getLatestCountryVatTypeRateAssoc()
public
getLatestCountryVatTypeRateAssoc() : array<string|int, array<string|int, string|null>>
Return values
array<string|int, array<string|int, string|null>> —rates as string decimals
getOrThrow()
public
getOrThrow(mixed $id[, mixed $lockMode = null ][, mixed $lockVersion = null ][, Exception $exception = null ]) : mixed
Parameters
- $id : mixed
- $lockMode : mixed = null
- $lockVersion : mixed = null
- $exception : Exception = null
getStandardVatRateHistoryListByCountry()
public
getStandardVatRateHistoryListByCountry(string $countryCode) : mixed
Parameters
- $countryCode : string
getVatTypeByCountryDateAndRate()
public
getVatTypeByCountryDateAndRate(Country|int|string $country, DateTime|string $date, string|null $rate) : VatRateHistory|null
The same rate may belong to multiple vat types. This method is here only as a drop-in replacement for another method with the same issue.
Parameters
- $country : Country|int|string
-
The country model, the id or the ISO 3166-1 alpha-2 code of the country
- $date : DateTime|string
- $rate : string|null
Return values
VatRateHistory|nullinsert()
public
insert(object $entity) : void
Parameters
- $entity : object
Tags
insertList()
public
insertList(array<string|int, object> $entities) : void
Parameters
- $entities : array<string|int, object>
Tags
merge()
public
merge(object $entity) : object
Parameters
- $entity : object
Tags
Return values
objectpersist()
public
persist(object $entity) : void
Parameters
- $entity : object
Tags
remove()
public
remove(object $entity) : void
Parameters
- $entity : object
Tags
update()
public
update(object $entity) : void
Parameters
- $entity : object
Tags
updateList()
public
updateList(array<string|int, object> $entities) : void
Parameters
- $entities : array<string|int, object>
Tags
getNativeSqlWithParameters()
code mostly copied from doctrine private methods
protected
getNativeSqlWithParameters(Query $query) : mixed
Parameters
- $query : Query
historyItemToVatTypeIdRateAssoc()
private
historyItemToVatTypeIdRateAssoc(VatRateHistory $item) : mixed
Parameters
- $item : VatRateHistory
loadAll()
private
loadAll() : void
loadCountryAssoc()
private
loadCountryAssoc() : void
loadLatestCountryAssoc()
private
loadLatestCountryAssoc() : mixed
loadLatestCountryVatTypeRateAssoc()
private
loadLatestCountryVatTypeRateAssoc() : mixed