class DataStore (View source)

The DataStore class.

Methods

__construct(callable $callback, boolean $shared = false, boolean $protected = false)

Class init.

mixed
get(Container $container, boolean $forceNew = false)

Get instance of this DataStore.

callable
getCallback()

Method to get property Callback

setCallback(callable $callback)

Method to set property callback

boolean
isShared(boolean $shared = null)

Method to get property Shared

boolean
isProtected(boolean $protected = null)

Method to get property Protected

mixed
getInstance()

Method to get property Instance

setInstance(mixed $instance)

Method to set property instance

Details

at line line 53
__construct(callable $callback, boolean $shared = false, boolean $protected = false)

Class init.

Parameters

callable $callback The callback handler of this data.
boolean $shared Is this a shared data?
boolean $protected Is this aprotected data?

at line line 69
mixed get(Container $container, boolean $forceNew = false)

Get instance of this DataStore.

Parameters

Container $container
boolean $forceNew

Return Value

mixed

at line line 89
callable getCallback()

Method to get property Callback

Return Value

callable

at line line 102
DataStore setCallback(callable $callback)

Method to set property callback

Parameters

callable $callback

Return Value

DataStore Return self to support chaining.

Exceptions

InvalidArgumentException

at line line 129
boolean isShared(boolean $shared = null)

Method to get property Shared

Parameters

boolean $shared

Return Value

boolean

at line line 146
boolean isProtected(boolean $protected = null)

Method to get property Protected

Parameters

boolean $protected

Return Value

boolean

at line line 161
mixed getInstance()

Method to get property Instance

Return Value

mixed

at line line 173
DataStore setInstance(mixed $instance)

Method to set property instance

Parameters

mixed $instance

Return Value

DataStore Return self to support chaining.