Esempio n. 1
0
 /**
  * Maps a single row on an object of the given class
  *
  * @param string $className The name of the target class
  * @param array $row A single array with field_name => value pairs
  * @return object An object of the given class
  */
 protected function mapSingleRow($className, array $row)
 {
     if ($this->identityMap->hasIdentifier($row['uid'], $className)) {
         $object = $this->identityMap->getObjectByIdentifier($row['uid'], $className);
     } else {
         $object = $this->createEmptyObject($className);
         $this->identityMap->registerObject($object, $row['uid']);
         $this->thawProperties($object, $row);
         $object->_memorizeCleanState();
         $this->persistenceSession->registerReconstitutedEntity($object);
     }
     return $object;
 }