• PHP Video Tutorials

PHP - Worker::stack() Function



Worker::stack - Stacking

Syntax

public int Worker::stack( Stackable $work )

Worker::stack() function can append a referenced Stackable to the stack of a referenced Worker.

Worker::stack() function can return new length of a stack.

Example

<?php
   class Work extends Stackable {
      public function run(){
         /** ... **/
      }
   }
   class My extends Worker {
      public function run(){
         /** ... **/
      }
   }
   $my = new My();
   var_dump($my->stack(new Work()));
?>
php_function_reference.htm
Advertisements