Worker::getStacked

Stack Analysis

Description

final public int Worker::getStacked ( void )

Returns the number of Stackables waiting to be executed by the referenced Worker

Parameters

This function has no parameters.

Return Values

An integral value

Examples

Example #1 Returns the number of objects currently waiting to be executed by the referenced Worker

<?php
class Work extends Stackable {
    
/** ... **/

    
public function run(){
        
/** ... **/
    
}
}

class 
My extends Worker {
    public function 
run(){
        
/** ... **/
    
}
}
$my = new My();
/** ... **/
$my->stack(new Work());
/** ... **/
printf("My worker has %d jobs remaining\n"$my->getStacked());
/** ... **/
?>

The above example will output:

My worker has 5 jobs remaining