Esempio n. 1
0
 public function testReverse()
 {
     $list = array(\Aimeos\MW\Convert\Factory::createConverter('DateTime/EnglishISO'), \Aimeos\MW\Convert\Factory::createConverter('Text/LatinUTF8'));
     $object = new \Aimeos\MW\Convert\Compose($list);
     $this->assertInstanceOf('\\Aimeos\\MW\\Convert\\Iface', $object);
     $this->assertEquals('01/02/2000 00:00:00 AM', $object->reverse('2000-01-02 00:00:00'));
 }
Esempio n. 2
0
 /**
  * Returns the list of converter objects based on the given converter map
  *
  * @param array $convmap List of converter names for the values at the position in the CSV file
  * @return array Associative list of positions and converter objects
  */
 protected function getConverterList(array $convmap)
 {
     $convlist = array();
     foreach ($convmap as $idx => $name) {
         $convlist[$idx] = \Aimeos\MW\Convert\Factory::createConverter($name);
     }
     return $convlist;
 }