CustomerMemoRepository
extends AbstractEventDispatchingRepository
in package
implements
CustomerMemoRepository
Class CustomerMemoRepository
Interfaces, Classes and Traits
- CustomerMemoRepository
- Interface CustomerMemoRepository
Table of Contents
- $eventDispatcher : EventDispatcherInterface
- $mapper : CustomerMemoMapper
- $reader : CustomerMemoReader
- $writer : CustomerMemoWriter
- __construct() : mixed
- createCustomerMemo() : CustomerMemoId
- Creates a new customer memo and returns its ID.
- createMultipleCustomerMemos() : CustomerMemoIds
- Creates multiple customer memos and returns their IDs.
- deleteCustomerMemosByCustomerIds() : void
- Deletes customer memos based on the given customer IDs.
- deleteCustomerMemosByMemoIds() : void
- Deletes customer memos based on the given customer memo IDs.
- dispatchEntityEvents() : void
- dispatchEvent() : void
- filterCustomerMemos() : CustomerMemos
- Returns a filtered and paginated collection of customer memos based on the given filter and sorting arguments.
- getCustomerMemoById() : CustomerMemo
- Returns a specific customer memo based on the given ID.
- getCustomerMemos() : CustomerMemos
- Returns all available customer memos.
- getCustomerMemosTotalCount() : int
- Returns total count of customer memos based on the given filter arguments.
- storeCustomerMemos() : void
- Stores multiple customer memos.
- setEventDispatcher() : void
- assertArgumentIsOfCorrectType() : void
Properties
$eventDispatcher
private
EventDispatcherInterface
$eventDispatcher
$mapper
private
CustomerMemoMapper
$mapper
$reader
private
CustomerMemoReader
$reader
$writer
private
CustomerMemoWriter
$writer
Methods
__construct()
public
__construct(CustomerMemoReader $reader, CustomerMemoWriter $writer, CustomerMemoMapper $mapper, EventDispatcherInterface $eventDispatcher) : mixed
Parameters
- $reader : CustomerMemoReader
- $writer : CustomerMemoWriter
- $mapper : CustomerMemoMapper
- $eventDispatcher : EventDispatcherInterface
Return values
mixed —createCustomerMemo()
Creates a new customer memo and returns its ID.
public
createCustomerMemo(CustomerId $customerId, CreatorId $creatorId, string $content) : CustomerMemoId
Parameters
- $customerId : CustomerId
- $creatorId : CreatorId
- $content : string
Tags
Return values
CustomerMemoId —createMultipleCustomerMemos()
Creates multiple customer memos and returns their IDs.
public
createMultipleCustomerMemos(array<string|int, mixed> ...$creationArguments) : CustomerMemoIds
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
CustomerMemoIds —deleteCustomerMemosByCustomerIds()
Deletes customer memos based on the given customer IDs.
public
deleteCustomerMemosByCustomerIds(CustomerId ...$ids) : void
Parameters
- $ids : CustomerId
Tags
Return values
void —deleteCustomerMemosByMemoIds()
Deletes customer memos based on the given customer memo IDs.
public
deleteCustomerMemosByMemoIds(CustomerMemoId ...$ids) : void
Parameters
- $ids : CustomerMemoId
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 —filterCustomerMemos()
Returns a filtered and paginated collection of customer memos based on the given filter and sorting arguments.
public
filterCustomerMemos(CustomerId $customerId, CustomerMemoFilters $filters, CustomerMemoSorting $sorting, Pagination $pagination) : CustomerMemos
Parameters
- $customerId : CustomerId
- $filters : CustomerMemoFilters
- $sorting : CustomerMemoSorting
- $pagination : Pagination
Tags
Return values
CustomerMemos —getCustomerMemoById()
Returns a specific customer memo based on the given ID.
public
getCustomerMemoById(CustomerMemoId $memoId) : CustomerMemo
Parameters
- $memoId : CustomerMemoId
Tags
Return values
CustomerMemo —getCustomerMemos()
Returns all available customer memos.
public
getCustomerMemos(CustomerId $customerId) : CustomerMemos
Parameters
- $customerId : CustomerId
Tags
Return values
CustomerMemos —getCustomerMemosTotalCount()
Returns total count of customer memos based on the given filter arguments.
public
getCustomerMemosTotalCount(CustomerId $customerId, CustomerMemoFilters $filters) : int
Parameters
- $customerId : CustomerId
- $filters : CustomerMemoFilters
Tags
Return values
int —storeCustomerMemos()
Stores multiple customer memos.
public
storeCustomerMemos(CustomerMemo ...$customerMemos) : void
Parameters
- $customerMemos : CustomerMemo
Tags
Return values
void —setEventDispatcher()
protected
setEventDispatcher(EventDispatcherInterface $eventDispatcher) : void
Parameters
- $eventDispatcher : EventDispatcherInterface
Return values
void —assertArgumentIsOfCorrectType()
private
assertArgumentIsOfCorrectType(mixed $actual, string $arrayPosition, string $class, int $index) : void
Parameters
- $actual : mixed
- $arrayPosition : string
- $class : string
- $index : int