Class \Prado\Util\Behaviors\TMapLazyLoadBehavior
TMapLazyLoadBehavior class.
TMapLazyLoadBehavior handles Application Parameters when there is no parameter key found. This allows for lazy loading of the parameter.
Prado::getApplication()->getParameters()->attachBehavior('name'
new TMapLazyLoadBehavior([$obj, 'getParam']));
This behavior will call $obj->getParam($key) every time the key is not found in the TMap or TPriorityMap.
Class hierarchy
- \Prado\Util\Behaviors\TMapLazyLoadBehavior
- \Prado\Util\TBehavior implements IBehavior
- \Prado\Util\TBaseBehavior implements IBaseBehavior uses TPriorityPropertyTrait
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 4.2.0
public
|
|
public
|
dyNoItem(mixed $value, string $key, TCallChain $callchain) : mixed
This is the dynamic event for handling TMap dyAddItem.
This calls handler($key). |
\Prado\TApplicationComponent::FX_CACHE_FILE, \Prado\TComponent::GLOBAL_RAISE_EVENT_LISTENER |