public function testRemove() { $line = new Line(array('field1' => 'hodnota1', 'field2' => 'hodnota2')); $this->assertEquals('hodnota2', $line->get('field2')); $line->remove('field2'); $this->assertEquals(1, $line->count()); $this->assertEquals('hodnota1', $line->get('field1')); }
public function process(Line $input) { $date = $input->get($this->inputField); $result = strtotime($date); $input->remove($this->inputField); $input->set($this->outputField, $result); }
public function process(Line $input) { $value = $input->get($this->inputField); $value = str_replace(array('<', '>'), '', $value); $input->remove($this->inputField); $input->set($this->outputField, $value); return $input; }
public function process(Line $input) { if ($this->delete) { $input->move($this->inputField, $this->outputField); } else { $input->set($this->outputField, $input->get($this->inputField)); } return $input; }
public function process(Line $line) { $line->set('myspecialkey', $line->get($this->inputField) . 'hash'); $line->remove($this->outputField); }