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'));
 }
Пример #2
0
 public function execute($params, \Fortissimo\ExecutionContext $cxt)
 {
     $buffer = array();
     foreach ($params as $name => $value) {
         $buffer[$name] = $value;
     }
     $cxt->add($this->name, $buffer);
 }
Пример #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));
 }
Пример #4
0
 public function execute($params, \Fortissimo\ExecutionContext $cxt)
 {
     foreach ($params as $name => $value) {
         $cxt->add($name, $value);
     }
 }
Пример #5
0
 public function execute($paramArray, \Fortissimo\ExecutionContext $cxt)
 {
     $forwardTo = $paramArray['forward'];
     $cxt->add($this->name, __CLASS__);
     throw new \Fortissimo\ForwardRequest($forwardTo, $cxt);
 }