Example #1
0
 /**
  * maps an mapping array between a SimpleXML and Objekt
  *
  * @param                   $mapping
  * @param \SimpleXMLElement $xml
  * @param                   $objekt
  */
 protected function map($mapping, \SimpleXMLElement $xml, $objekt)
 {
     foreach ($mapping as $key) {
         if (isset($xml->{$key})) {
             $setter = $this->mapper->getSetter($key);
             $objekt->{$setter}($this->cast($xml->{$key}, $this->mapper->getType($key)));
         }
     }
 }