Memory value container

Movable (may be swapped with specified backend and unloaded).

 Methods

Object constructor

__construct(\Zend\Memory\MemoryManager $memoryManager, int $id, string $value) 

Parameters

$id

int

$value

string

Get handler

__get(string $property) : string

Loads object if necessary and moves it to the top of loaded objects list. Swaps objects from the bottom of loaded objects list, if necessary.

Parameters

$property

string

Exceptions

\Zend\Memory\Exception\InvalidArgumentException

Returns

string

Set handler

__set(string $property, string $value) 

Parameters

$property

string

$value

string

Exceptions

\Zend\Memory\Exception\InvalidArgumentException

Get string value reference

getRef() : \Zend\Memory\Container\string

Must be used for value access before PHP v 5.2 or may be used for performance considerations

Returns

\Zend\Memory\Container\string

Return true if object is locked

isLocked() : bool

Returns

bool

Lock object in memory.

lock() 

Signal, that value is updated by external code.

touch() 

Should be used together with getRef()

Unlock object

unlock() 

 Properties

 

Internal object Id

$id : int

 

Memory manager reference

$memManager : \Zend\Memory\MemoryManager

 

Value state (LOADED/SWAPPED/LOCKED)

$state : int

 

Value object

$value : \Zend\Memory\Value

 Constants

 

Value states

LOADED 

 

LOCKED

LOCKED 

 

SWAPPED

SWAPPED