CoolCMS API

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

Methods

__construct()

public __construct(Container $container) : mixed
Parameters
$container : Container
On this page

Search results