Ejemplo n.º 1
0
Archivo: Das.php Proyecto: psagi/sdo
 /**
  * Makes the decision on how the PHP object should be copied
  * and recurse as necessary
  *
  * @param string $item_name Name
  * @param string $item      Item
  * @param SDO    $sdo       SDO
  *
  * @return null
  */
 protected function decodeToSDOTyped($item_name, $item, $sdo)
 {
     $item_type = $this->gettype($item);
     // SCA::$logger->log( "Typed - Name: " . $item_name .  " Type: ". $item_type . "\n");
     if ($item_type == "object") {
         $new_sdo = $sdo->createDataObject($item_name);
         $this->decodeObjectToSDOTyped($item, $new_sdo);
     } else {
         if ($item_type == "array") {
             //$new_sdo = $sdo->createDataObject($item_name);
             $this->decodeArrayToSDOTyped($item_name, $item, $sdo);
         } else {
             $sdo[$item_name] = $item;
         }
     }
 }