WithdrawalRepository
extends AbstractEventDispatchingRepository
in package
implements
WithdrawalRepository
Class WithdrawalRepository
Interfaces, Classes and Traits
- WithdrawalRepository
- Interface WithdrawalRepository
Table of Contents
- $eventDispatcher : EventDispatcherInterface
- $mapper : WithdrawalMapper
- $reader : WithdrawalReader
- $writer : WithdrawalWriter
- __construct() : mixed
- WithdrawalRepository constructor.
- createMultipleWithdrawals() : WithdrawalIds
- Creates multiple withdrawals and returns their IDs.
- createWithdrawal() : WithdrawalId
- Creates a new withdrawals and returns its ID.
- deleteWithdrawals() : void
- Deletes withdrawals based on the given IDs.
- dispatchEntityEvents() : void
- dispatchEvent() : void
- filterWithdrawals() : Withdrawals
- Returns a filtered and paginated collection of withdrawals based on the given filter and sorting arguments.
- getAllWithdrawals() : Withdrawals
- Returns all available withdrawals.
- getWithdrawalById() : Withdrawal
- Returns a specific withdrawals based on the given ID.
- getWithdrawalsTotalCount() : int
- Returns total count of withdrawals based on the given filter arguments.
- storeWithdrawals() : void
- Stores multiple withdrawals.
- setEventDispatcher() : void
Properties
$eventDispatcher
private
EventDispatcherInterface
$eventDispatcher
$mapper
private
WithdrawalMapper
$mapper
$reader
private
WithdrawalReader
$reader
$writer
private
WithdrawalWriter
$writer
Methods
__construct()
WithdrawalRepository constructor.
public
__construct(WithdrawalMapper $mapper, WithdrawalReader $reader, WithdrawalWriter $writer, EventDispatcherInterface $eventDispatcher) : mixed
Parameters
- $mapper : WithdrawalMapper
- $reader : WithdrawalReader
- $writer : WithdrawalWriter
- $eventDispatcher : EventDispatcherInterface
Return values
mixed —createMultipleWithdrawals()
Creates multiple withdrawals and returns their IDs.
public
createMultipleWithdrawals(array<string|int, mixed> ...$creationArguments) : WithdrawalIds
Parameters
- $creationArguments : array<string|int, mixed>
-
Provided array must contain arguments like they are used in the single creation method. Provide multiple arrays for multi creation.
Tags
Return values
WithdrawalIds —createWithdrawal()
Creates a new withdrawals and returns its ID.
public
createWithdrawal(OrderDetails $order, CustomerDetails $customer[, string $date = null ][, string $content = '' ][, bool $createdByAdmin = true ]) : WithdrawalId
Parameters
- $order : OrderDetails
- $customer : CustomerDetails
- $date : string = null
- $content : string = ''
- $createdByAdmin : bool = true
Tags
Return values
WithdrawalId —deleteWithdrawals()
Deletes withdrawals based on the given IDs.
public
deleteWithdrawals(WithdrawalId ...$ids) : void
Parameters
- $ids : WithdrawalId
Tags
Return values
void —dispatchEntityEvents()
public
dispatchEntityEvents(EventRaisingEntity $entity) : void
Parameters
- $entity : EventRaisingEntity
Tags
Return values
void —dispatchEvent()
public
dispatchEvent(object $event) : void
Parameters
- $event : object
Tags
Return values
void —filterWithdrawals()
Returns a filtered and paginated collection of withdrawals based on the given filter and sorting arguments.
public
filterWithdrawals(Filters $filters, Sorting $sorting, Pagination $pagination) : Withdrawals
Parameters
- $filters : Filters
- $sorting : Sorting
- $pagination : Pagination
Tags
Return values
Withdrawals —getAllWithdrawals()
Returns all available withdrawals.
public
getAllWithdrawals() : Withdrawals
Tags
Return values
Withdrawals —getWithdrawalById()
Returns a specific withdrawals based on the given ID.
public
getWithdrawalById(WithdrawalId $id) : Withdrawal
Parameters
- $id : WithdrawalId
Tags
Return values
Withdrawal —getWithdrawalsTotalCount()
Returns total count of withdrawals based on the given filter arguments.
public
getWithdrawalsTotalCount(Filters $criteria) : int
Parameters
- $criteria : Filters
Tags
Return values
int —storeWithdrawals()
Stores multiple withdrawals.
public
storeWithdrawals(Withdrawal ...$withdrawals) : void
Parameters
- $withdrawals : Withdrawal
Tags
Return values
void —setEventDispatcher()
protected
setEventDispatcher(EventDispatcherInterface $eventDispatcher) : void
Parameters
- $eventDispatcher : EventDispatcherInterface