Worker::unstack

Stacking

Description

final public int Worker::unstack ([ Stackable $work ] )

Removes the referenced Stackable ( or all Stackables if parameters are void ) from stack of the referenced Worker

Parameters

work

An object of type Stackable

Return Values

The new length of the stack

Examples

Example #1 Removing Stackables from Workers

<?php
class Work extends Stackable {
    public function 
run() {
        
    }
}

class 
My extends Worker {
    public function 
run() {
        
/** ... **/
    
}
}
$my = new My();
$work = new Work();
var_dump($my->stack($work));
var_dump($my->unstack($work));
?>

The above example will output:

int(1)
int(0)