PHP Class WeakRef, ClearSky

WARNING: Do not include this file
Show file Open project: robske110/ClearSky

Public Methods

Method Description
__construct ( object $object = null ) Constructs a new weak reference.
acquire ( ) : boolean Acquires a strong reference on that object, virtually turning the weak reference into a strong one.
get ( ) : object Returns the object pointed to by the weak reference
release ( ) : boolean Releases a previously acquired reference, potentially turning a strong reference back into a weak reference.
valid ( ) : boolean Checks whether the object referenced still exists

Method Details

__construct() public method

Constructs a new weak reference.
public __construct ( object $object = null )
$object object

acquire() public method

Acquires a strong reference on that object, virtually turning the weak reference into a strong one.
public acquire ( ) : boolean
return boolean

get() public method

Returns the object pointed to by the weak reference
public get ( ) : object
return object

release() public method

Releases a previously acquired reference, potentially turning a strong reference back into a weak reference.
public release ( ) : boolean
return boolean

valid() public method

Checks whether the object referenced still exists
public valid ( ) : boolean
return boolean