示例#1
0
 function assemble(OrmEntity $entity, array $tuple, FetchStrategy $fetchStrategy)
 {
     foreach ($this->logicalSchema->getProperties() as $property) {
         if (!$property->getVisibility()->isSettable()) {
             continue;
         }
         $propertyTuple = $this->getPropertyTuple($property, $tuple);
         $propertyType = $property->getType();
         $setter = $property->getSetter();
         $value = $propertyType->assemble($propertyTuple, $fetchStrategy);
         $entity->{$setter}($value);
     }
     return $entity;
 }
示例#2
0
 function assemble(OrmEntity $entity, array $tuple, FetchStrategy $fetchStrategy)
 {
     $this->strategy = $fetchStrategy;
     $this->objects[] = $entity;
     foreach ($this->logicalSchema->getProperties() as $property) {
         if (!$property->getVisibility()->isSettable()) {
             continue;
         }
         $propertyTuple = $this->getPropertyTuple($property, $tuple);
         if (!isset($this->properties[$property->getName()])) {
             $this->properties[$property->getName()] = array();
         }
         $this->properties[$property->getName()][] = $propertyTuple;
     }
     return $entity;
 }