OrderStatusRepository
in package
implements
OrderStatusRepositoryInterface
Class OrderStatusRepository
Tags
Interfaces, Classes and Traits
- OrderStatusRepositoryInterface
- Interface OrderStatusRepositoryInterface
Table of Contents
- $deleter : OrderStatusDeleterInterface
- $factory : OrderStatusFactoryInterface
- $languageProvider : LanguageProvider
- $reader : OrderStatusReaderInterface
- $writer : OrderStatusWriterInterface
- __construct() : mixed
- OrderStatusRepository constructor.
- create() : int
- Creates a new order status.
- find() : OrderStatus|null
- Returns an order status entity by the given order status id. If no data was found, null is returned.
- findAll() : OrderStatusCollection
- Returns a collection with all order status.
- get() : OrderStatus
- Returns an order status entity by the given order status id. If no data was found, an exception is thrown.
- remove() : $this|OrderStatusRepositoryInterface
- Removes an order status.
- update() : $this|OrderStatusRepositoryInterface
- Updates an order status.
Properties
$deleter
protected
OrderStatusDeleterInterface
$deleter
$factory
protected
OrderStatusFactoryInterface
$factory
$languageProvider
protected
LanguageProvider
$languageProvider
$reader
protected
OrderStatusReaderInterface
$reader
$writer
protected
OrderStatusWriterInterface
$writer
Methods
__construct()
OrderStatusRepository constructor.
public
__construct(OrderStatusFactoryInterface $factory, OrderStatusReaderInterface $reader, OrderStatusWriterInterface $writer, OrderStatusDeleterInterface $deleter, LanguageProvider $languageProvider) : mixed
Parameters
- $factory : OrderStatusFactoryInterface
-
Factory instance to create order status entities.
- $reader : OrderStatusReaderInterface
-
Reader instance to fetch data from the storage.
- $writer : OrderStatusWriterInterface
-
Writer instance to add or update data in the storage.
- $deleter : OrderStatusDeleterInterface
-
Deleter instance to remove data from the storage.
- $languageProvider : LanguageProvider
-
Provider instance to get language codes from language ids.
Return values
mixed —create()
Creates a new order status.
public
create(OrderStatus $orderStatus) : int
Parameters
- $orderStatus : OrderStatus
-
Order status entity with new data.
Return values
int —Id of new order status entity.
find()
Returns an order status entity by the given order status id. If no data was found, null is returned.
public
find(IntType $orderStatusId) : OrderStatus|null
Parameters
- $orderStatusId : IntType
-
Id of expected OrderStatus entity.
Return values
OrderStatus|null —Whether the found order status entity or null.
findAll()
Returns a collection with all order status.
public
findAll() : OrderStatusCollection
Return values
OrderStatusCollection —Collection of all order status resources.
get()
Returns an order status entity by the given order status id. If no data was found, an exception is thrown.
public
get(IntType $orderStatusId) : OrderStatus
Parameters
- $orderStatusId : IntType
-
Id of expected OrderStatus entity.
Tags
Return values
OrderStatus —Expected order status entity.
remove()
Removes an order status.
public
remove(IntType $orderStatusId) : $this|OrderStatusRepositoryInterface
Parameters
- $orderStatusId : IntType
-
Id of order status entity to be removed.
Return values
$this|OrderStatusRepositoryInterface —Same instance for chained method calls.
update()
Updates an order status.
public
update(OrderStatus $orderStatus) : $this|OrderStatusRepositoryInterface
Parameters
- $orderStatus : OrderStatus
-
Order status entity with updated data.
Return values
$this|OrderStatusRepositoryInterface —Same instance for chained method calls.