Worker::stack PHP Method

stack() public method

Appends the referenced object to the stack of the referenced Worker
public stack ( Collectable &$work ) : integer
$work Collectable Collectable object to be executed by the referenced Worker
return integer The new length of the stack
    public function stack(Collectable &$work)
    {
    }

Usage Example

Example #1
0
 public function testGetStacked()
 {
     $worker = new Worker();
     $work = new WorkerTestWork();
     $worker->stack($work);
     $this->assertEquals(1, $worker->getStacked());
     $worker->stack($work);
     $this->assertEquals(2, $worker->getStacked());
 }
All Usage Examples Of Worker::stack