ParcelServiceRepository
extends AbstractEventDispatchingRepository
in package
implements
ParcelServiceRepository
Class ParcelServiceRepository
Interfaces, Classes and Traits
- ParcelServiceRepository
- Interface ParcelServiceRepository
Table of Contents
- $eventDispatcher : EventDispatcherInterface
- $mapper : ParcelServiceMapper
- $reader : ParcelServiceReader
- $writer : ParcelServiceWriter
- __construct() : mixed
- ParcelServiceRepository constructor.
- createMultipleParcelServices() : ParcelServiceIds
- Creates multiple parcel services and returns their IDs.
- createParcelService() : ParcelServiceId
- Creates a new parcel service and returns its ID.
- deleteParcelServices() : void
- Deletes parcel services based on the given IDs.
- dispatchEntityEvents() : void
- dispatchEvent() : void
- filterParcelServices() : ParcelServices
- Returns a filtered and paginated collection of parcel services based on the given filter and sorting arguments.
- getAllParcelServices() : ParcelServices
- Returns all available parcel services.
- getParcelServiceById() : ParcelService
- Returns a specific parcel service based on the given ID.
- getParcelServicesTotalCount() : int
- Returns total count of parcel services based on the given filter arguments.
- storeParcelServices() : void
- Stores multiple parcel services.
- setEventDispatcher() : void
Properties
$eventDispatcher
private
EventDispatcherInterface
$eventDispatcher
$mapper
private
ParcelServiceMapper
$mapper
$reader
private
ParcelServiceReader
$reader
$writer
private
ParcelServiceWriter
$writer
Methods
__construct()
ParcelServiceRepository constructor.
public
__construct(ParcelServiceMapper $mapper, ParcelServiceReader $reader, ParcelServiceWriter $writer, EventDispatcherInterface $eventDispatcher) : mixed
Parameters
- $mapper : ParcelServiceMapper
- $reader : ParcelServiceReader
- $writer : ParcelServiceWriter
- $eventDispatcher : EventDispatcherInterface
Return values
mixed —createMultipleParcelServices()
Creates multiple parcel services and returns their IDs.
public
createMultipleParcelServices(array<string|int, mixed> ...$creationArguments) : ParcelServiceIds
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
ParcelServiceIds —createParcelService()
Creates a new parcel service and returns its ID.
public
createParcelService(string $name, ParcelServiceDescriptions $descriptions[, bool $isDefault = false ][, string $shipmentType = '' ]) : ParcelServiceId
Parameters
- $name : string
- $descriptions : ParcelServiceDescriptions
- $isDefault : bool = false
- $shipmentType : string = ''
Tags
Return values
ParcelServiceId —deleteParcelServices()
Deletes parcel services based on the given IDs.
public
deleteParcelServices(ParcelServiceId ...$ids) : void
Parameters
- $ids : ParcelServiceId
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 —filterParcelServices()
Returns a filtered and paginated collection of parcel services based on the given filter and sorting arguments.
public
filterParcelServices(Filters $filters, Sorting $sorting, Pagination $pagination) : ParcelServices
Parameters
- $filters : Filters
- $sorting : Sorting
- $pagination : Pagination
Tags
Return values
ParcelServices —getAllParcelServices()
Returns all available parcel services.
public
getAllParcelServices() : ParcelServices
Tags
Return values
ParcelServices —getParcelServiceById()
Returns a specific parcel service based on the given ID.
public
getParcelServiceById(ParcelServiceId $id) : ParcelService
Parameters
- $id : ParcelServiceId
Tags
Return values
ParcelService —getParcelServicesTotalCount()
Returns total count of parcel services based on the given filter arguments.
public
getParcelServicesTotalCount(Filters $filters) : int
Parameters
- $filters : Filters
Tags
Return values
int —storeParcelServices()
Stores multiple parcel services.
public
storeParcelServices(ParcelService ...$parcelServices) : void
Parameters
- $parcelServices : ParcelService
Tags
Return values
void —setEventDispatcher()
protected
setEventDispatcher(EventDispatcherInterface $eventDispatcher) : void
Parameters
- $eventDispatcher : EventDispatcherInterface