SHARE
TWEET

Untitled

a guest Feb 26th, 2012 28 Never
  1. /*** this is shell
  2. <?php
  3. Class DealsShell extends Shell {
  4.    
  5.    
  6.     var $tasks = array('Teambuy', 'Dealticker', 'Swarmjam');
  7.    
  8.     function main() {
  9.         echo "in main\n";
  10.         foreach ($this->tasks as $task) {
  11.             echo "executing $task\n";
  12.             $this->$task->execute();
  13.         }
  14.     }
  15. }
  16. /*** this is task
  17. class TeambuyTask extends Shell {
  18.     public $uses = array('Showreel.Deal', 'Showreel.Teambuy');
  19.  
  20. ...
  21. ..
  22. }
RAW Paste Data
Top