Пример #1
0
 public function execute($params, \Fortissimo\ExecutionContext $cxt)
 {
     $buffer = array();
     foreach ($params as $name => $value) {
         $buffer[$name] = $value;
     }
     $cxt->add($this->name, $buffer);
 }
 public function testFromArray()
 {
     $initial = array('foo' => 'bar', 'narf' => 'bargle');
     $cxt = new ExecutionContext(array('a' => 'b'));
     $cxt->fromArray($initial);
     $this->assertEquals(2, $cxt->size());
     $this->assertTrue($cxt->has('narf'));
     $this->assertEquals('bargle', $cxt->get('narf'));
 }
Пример #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));
 }
 public function execute($paramArray, \Fortissimo\ExecutionContext $cxt)
 {
     if ($paramArray['retval']) {
         $cxt->put($this->name, $paramArray['retval']);
     }
 }
Пример #5
0
 public function execute($params, \Fortissimo\ExecutionContext $cxt)
 {
     foreach ($params as $name => $value) {
         $cxt->add($name, $value);
     }
 }
Пример #6
0
 public function execute($paramArray, \Fortissimo\ExecutionContext $cxt)
 {
     $forwardTo = $paramArray['forward'];
     $cxt->add($this->name, __CLASS__);
     throw new \Fortissimo\ForwardRequest($forwardTo, $cxt);
 }