Exemple #1
0
 /**
  * Helper class to default sequence event processing
  * @param array $events
  * @param callable $callable
  */
 function __construct(array $events, callable $callable)
 {
     parent::__construct();
     foreach ($events as $e) {
         $this->addStream($e);
     }
     $this->sequence($events, $callable);
 }
Exemple #2
0
 /**
  * Helper class to default any event processing
  * @param mixed $stream
  * @param callable $callable
  */
 function __construct($stream, callable $callable)
 {
     parent::__construct($stream);
     $this->any($stream, $callable);
 }
Exemple #3
0
 /**
  * Helper class to default periodic processing
  * @param integer $seconds
  * @param callable $callable
  */
 function __construct($seconds, callable $callable)
 {
     parent::__construct();
     $this->every($seconds, $callable);
 }
Exemple #4
0
 /**
  * Helper class to default after event processing
  * @param integer $amount
  * @param mixed $stream
  * @param callable $callable
  */
 function __construct($amount, $stream, callable $callable)
 {
     parent::__construct($stream);
     $this->after($amount, $stream, $callable);
 }