OrderManagerFactory
in package
FinalYes
Lazy access to {@see OrderManager} that breaks a circular DI dependency.
OrderManager calls the process managers from its completedSave() and completedDelete()
hooks, while OrderStockManager and OrderInvoiceGenerator need its updateColumns()
back. A consumer therefore holds this factory instead of OrderManager, and the manager
is fetched from the built container at call time. Only manager-tier classes and generators
may inject the factory.
Table of Contents
Properties
- $container : Container
- $instance : OrderManager|null
Methods
- __construct() : mixed
- create() : OrderManager
- Returns the `OrderManager` singleton; the local cache only saves repeated lookups.
Properties
$container read-only
private
Container
$container
$instance
private
OrderManager|null
$instance
= null
Methods
__construct()
public
__construct(Container $container) : mixed
Parameters
- $container : Container
create()
Returns the `OrderManager` singleton; the local cache only saves repeated lookups.
public
create() : OrderManager