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