示例#1
0
 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;
 }
示例#3
0
 public function testToArray()
 {
     $line = new Line(array('field1' => 'hodnota1', 'field2' => 'hodnota2'));
     $array = $line->getArray();
     $this->assertEquals(2, count($array));
     $this->assertEquals('hodnota1', $array['field1']);
     $this->assertEquals('hodnota2', $array['field2']);
 }
示例#4
0
 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;
 }
示例#5
0
 public function process(Line $line)
 {
     $line->set('myspecialkey', $line->get($this->inputField) . 'hash');
     $line->remove($this->outputField);
 }
示例#6
0
 public function process(Line $input)
 {
     $input->remove($this->inputField);
 }
 public function process(Line $input)
 {
     if ($input->exists($this->inputField)) {
         $input->remove($this->inputField);
     }
 }