Memory object container access controller.

Memory manager stores a list of generated objects to control them. So container objects always have at least one reference and can't be automatically destroyed.

This class is intended to be an userland proxy to memory container object. It's not referenced by memory manager and class destructor is invoked immidiately after gouing out of scope or unset operation.

Class also provides Zend_Memory_Container_Interface interface and works as proxy for such cases.

category Zend
package Zend_Memory
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Object constructor

__construct(\Zend_Memory_Container_Movable $memContainer) 

Parameters

$memContainer

Object destructor

__destruct() 

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

Returns

string

Set handler

__set(string $property, string $value) 

Parameters

$property

string

$value

string

Exceptions

\Zend_Exception

Get string value reference

getRef() : \&string

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

inherited_from \Zend_Memory_Container_Interface::getRef()

Returns

\&string

Return true if object is locked

isLocked() : boolean
inherited_from \Zend_Memory_Container_Interface::isLocked()

Returns

boolean

Lock object in memory.

lock() 
inherited_from \Zend_Memory_Container_Interface::lock()

Signal, that value is updated by external code.

touch() 

Should be used together with getRef()

inherited_from \Zend_Memory_Container_Interface::touch()

Unlock object

unlock() 
inherited_from \Zend_Memory_Container_Interface::unlock()

 Properties

 

Memory container object

$_memContainer : \Zend_Memory_Container

Default