Пример #1
0
 /**
  * @param RelationshipsInterface $relationships
  * @param $record
  */
 protected function hydrateRelationships(RelationshipsInterface $relationships, $record)
 {
     /** @var RelationshipInterface $relationship */
     foreach ($relationships->getAll() as $key => $relationship) {
         $this->callHydrateRelationship($key, $relationship, $record);
     }
 }
 /**
  * @inheritdoc
  */
 protected function hydrateRelationships(RelationshipsInterface $relationships, $record)
 {
     /** @var RelationshipInterface $relationship */
     foreach ($relationships->getAll() as $key => $relationship) {
         /** If there is a specific method for this relationship, we'll hydrate that */
         if ($this->callHydrateRelationship($key, $relationship, $record)) {
             continue;
         }
         /** If this is a has-one, we'll hydrate it. */
         if ($relationship->isHasOne()) {
             $this->hydrateHasOne($key, $relationship, $record);
         }
     }
 }