public function testAdd()
 {
     $cxt = new ExecutionContext(array('foo' => 'bar'));
     $cxt->add('narf', 'bargle');
     $this->assertEquals('bargle', $cxt->get('narf'));
     $cxt->add('foo', 'baz');
     $this->assertEquals('baz', $cxt->get('foo'));
 }
Exemplo n.º 2
0
 public function execute($params, \Fortissimo\ExecutionContext $cxt)
 {
     $buffer = array();
     foreach ($params as $name => $value) {
         $buffer[$name] = $value;
     }
     $cxt->add($this->name, $buffer);
 }
Exemplo n.º 3
0
 public function execute($params, \Fortissimo\ExecutionContext $cxt)
 {
     $format = 'No Format';
     $pos = array();
     foreach ($params as $name => $value) {
         if ($name == 'format') {
             $format = $value;
         } elseif (!is_numeric($name)) {
             continue;
         } else {
             $pos[(int) $name] = $value;
         }
     }
     $cxt->add($this->name, vsprintf($format, $pos));
 }
Exemplo n.º 4
0
 public function execute($params, \Fortissimo\ExecutionContext $cxt)
 {
     foreach ($params as $name => $value) {
         $cxt->add($name, $value);
     }
 }
Exemplo n.º 5
0
 public function execute($paramArray, \Fortissimo\ExecutionContext $cxt)
 {
     $forwardTo = $paramArray['forward'];
     $cxt->add($this->name, __CLASS__);
     throw new \Fortissimo\ForwardRequest($forwardTo, $cxt);
 }