PHP Class PHPDaemon\Structures\ObjectStorage

Author: Vasily Zorin ([email protected])
Inheritance: extends SplObjectStorage, use trait PHPDaemon\Traits\ClassWatchdog, use trait PHPDaemon\Traits\StaticObjectWatchdog
显示文件 Open project: kakserpom/phpdaemon Class Usage Examples

Public Methods

Method Description
detachFirst ( ) : object Detaches first object and returns it
each ( string $method, $args ) : integer Call given method of all objects in storage
getFirst ( ) : object Returns first object
removeAll ( SplObjectStorage $obj = null ) : void Remove all objects from this storage, which contained in another storage

Method Details

detachFirst() public method

Detaches first object and returns it
public detachFirst ( ) : object
return object

each() public method

Call given method of all objects in storage
public each ( string $method, $args ) : integer
$method string Method name
$args Arguments
return integer Number of called objects

getFirst() public method

Returns first object
public getFirst ( ) : object
return object

removeAll() public method

Remove all objects from this storage, which contained in another storage
public removeAll ( SplObjectStorage $obj = null ) : void
$obj SplObjectStorage
return void