\Charcoal\Model\ServiceModelLoaderBuilder

Model Loader Builder.

Build custom ModelLoader objects with a certain obj type / optional obj key.

Summary

Methods
Properties
Constants
__construct()
build()
__invoke()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
setFactory()
setCachePool()
$factory
$cachePool
N/A

Properties

$factory

$factory : \Charcoal\Factory\FactoryInterface

Type

\Charcoal\Factory\FactoryInterface

$cachePool

$cachePool : \Psr\Cache\CacheItemPoolInterface

Type

\Psr\Cache\CacheItemPoolInterface

Methods

__construct()

__construct(array  $data) 

Parameters

array $data

Builder dependencies.

build()

build(string  $objType, string  $objKey = null) : \Charcoal\Model\Service\ModelLoader

Parameters

string $objType

The object type of the ModelLoader.

string $objKey

Optional object key, to set on the ModelLoader.

Returns

\Charcoal\Model\Service\ModelLoader

__invoke()

__invoke(string  $objType, string  $objKey = null) : \Charcoal\Model\Service\ModelLoader

The builder can be invoked (used as function).

Parameters

string $objType

The object type of the ModelLoader.

string $objKey

Optional object key, to set on the ModelLoader.

Returns

\Charcoal\Model\Service\ModelLoader

setFactory()

setFactory(\Charcoal\Factory\FactoryInterface  $factory) : \Charcoal\Model\Service\ModelLoaderBuilder

Parameters

\Charcoal\Factory\FactoryInterface $factory

The factory to use to create models.

Returns

\Charcoal\Model\Service\ModelLoaderBuilder

Chainable

setCachePool()

setCachePool(\Psr\Cache\CacheItemPoolInterface  $cachePool) : \Charcoal\Model\Service\ModelLoaderBuilder

Parameters

\Psr\Cache\CacheItemPoolInterface $cachePool

The PSR-6 compliant cache pool.

Returns

\Charcoal\Model\Service\ModelLoaderBuilder

Chainable