Hydrate the subject

@param  HydrationEvent            $event
@return \Tmdb\Model\AbstractModel
550436
public function hydrateSubject(HydrationEvent $event)
    {
        $objectHydrator = new ObjectHydrator();

        return $objectHydrator->hydrate($event->getSubject(), $event->getData());
    }
626993
public function hydrate(array $data, $object)
    {
        $this->prepare($object);

        if ($this->byValue) {
            return $this->hydrateByValue($data, $object);
        }

        return $this->hydrateByReference($data, $object);
    }
757518
public function hydrate(array $data, $object)
    {
        if (isset($data['name'])) {
            $object->setName($data['name']);
        }
        if (isset($data['facts_timestamp'])) {
            $object->setReportedAt(new \DateTime($data['facts_timestamp']));
        }
        return $object;
    }
236822
public function hydrate(array $data, $object)
    {
        parent::hydrate($data, $object);
        $object->setEnvironment($object->getFact(NodeInterface::ENVIRONMENT_FACT));
        return $object;
    }
1193595
public function hydrate($data)
    {
        if ($data instanceof \ArrayObject) {
            $data = $data->getArrayCopy();
        } else {
            if ($data instanceof \Iterator) {
                $data = iterator_to_array($data);
            }
        }

        if (!is_array($data)) {
            throw new Exception(get_class($this) . ' entities must be hydrated using either an array, an ArrayObject or an Iterator');
        }

        foreach ($data as $key => $value) {
            $methodName = 'set' . $this->toCamelCase($this->mapFrom($key));

            if (method_exists($this, $methodName)) {
                $this->$methodName($value);
            }
        }

        return $this;
    }
89193
public function hydrateLegacyHandler(HydrationEvent $event)
    {
        $entity = $event->getArgument('entity');
        if ($entity instanceof Content) {
            $entity->setLegacyService($this->legacy);
        }
    }
1115686
public static function hydrate(stdClass $organization)
    {
        $hydrated = new OrgEntity();

        if (isset($organization->id)) {
            $hydrated->setId($organization->id);
        }

        if (isset($organization->name)) {
            $hydrated->setName($organization->name);
        }

        if (isset($organization->valid_until)) {
            $hydrated->setValidUntil(new DateTime($organization->valid_until));
        }

        if (isset($organization->quotas) && is_array($organization->quotas)) {
            $hydrated->setQuotas(QuotaHydrator::hydrateCollection($organization->quotas));
        }

        if (isset($organization->trial_issue_types) && is_array($organization->trial_issue_types)) {
            $hydrated->setTrialIssueTypes(TypeHydrator::hydrateCollection($organization->trial_issue_types));
        }

        if (isset($organization->disabled)) {
            $hydrated->setDisabled($organization->disabled);
        }

        return $hydrated;
    }
1256229
public function hydrate($hydrated = true)
    {
        if ($hydrated && $this->getEntityClassName()) {
            $this->hydrated = true;
        } else {
            $this->hydrated = false;
        }
        return $this;
    }
893443
public function hydrate($incoming, $model, Map $context = null)
    {
        $callable = $this->getDelegateHydrator();

        if (null === $context && $this->provide_fallback_context) {
            // Provide a non-null context so null checks aren't later required
            $context = new Map();
        }

        return $callable($incoming, $model, $context);
    }
1251163
public static function hydrate(stdClass $source)
    {
        $hydrated = new SourceEntity();

        if (isset($source->id)) {
            $hydrated->setId($source->id);
        }

        if (isset($source->class)) {
            $hydrated->setClass($source->class);
        }

        if (isset($source->method)) {
            $hydrated->setMethod($source->method);
        }

        if (isset($source->property)) {
            $hydrated->setProperty($source->property);
        }

        if (isset($source->parameter)) {
            $hydrated->setParameter($source->parameter);
        }

        if (isset($source->type)) {
            $hydrated->setType($source->type);
        }

        return $hydrated;
    }
1143408
public function hydrate(ObjectInterface $object, Property $property, GenerationContext $context): ObjectInterface
    {
        $instance = $object->getInstance();
        try {
            $this->propertyAccessor->setValue($instance, $property->getName(), $property->getValue());
        } catch (SymfonyNoSuchPropertyException $exception) {
            throw HydrationExceptionFactory::createForCouldNotHydrateObjectWithProperty($object, $property, 0, $exception);
        } catch (SymfonyAccessException $exception) {
            throw HydrationExceptionFactory::createForInaccessibleProperty($object, $property, 0, $exception);
        } catch (SymfonyInvalidArgumentException $exception) {
            throw HydrationExceptionFactory::createForInvalidProperty($object, $property, 0, $exception);
        } catch (SymfonyPropertyAccessException $exception) {
            throw HydrationExceptionFactory::create($object, $property, 0, $exception);
        } catch (TypeError $error) {
            throw HydrationExceptionFactory::createForInvalidProperty($object, $property, 0, $error);
        }

        return new SimpleObject($object->getId(), $instance);
    }
1029241
public static function hydrate(stdClass $upload)
    {
        $hydrated = new UploadEntity;

        if (isset($upload->id)) {
            $hydrated->setId($upload->id);
        }

        if (isset($upload->created_at)) {
            $hydrated->setCreatedAt(new DateTime($upload->created_at));
        }

        if (isset($upload->name)) {
            $hydrated->setName($upload->name);
        }

        if (isset($upload->extension)) {
            $hydrated->setExtension($upload->extension);
        }

        if (isset($upload->size)) {
            $hydrated->setSize($upload->size);
        }

        if (isset($upload->file)) {
            $hydrated->setFile($upload->file);
        }

        if (isset($upload->created_by)) {
            $hydrated->setCreatedBy(UserHydrator::hydrate($upload->created_by));
        }

        if (isset($upload->application)) {
            $hydrated->setApplication(ApplicationHydrator::hydrate($upload->application));
        }

        return $hydrated;
    }
1340612
protected function hydrate($entity, array $arguments)
    {
        foreach ($arguments as $argument => $value) {
            if (is_array($value)) {
                if(isset($this->em->getClassMetadata(get_class($entity))->associationMappings[$argument])) {
                    $value = $this->hydrateRelation($entity, $argument, $value);
                }
            }
            $entity->{"set".Inflector::camelize($argument)}($value);
        }

        return $entity;
    }
383733
public function handleHydrate(HydrateEvent $event)
    {
        $document = $event->getDocument();

        if (!$document instanceof RouteBehavior) {
            return;
        }

        $document->setHistory($event->getNode()->getPropertyValue(self::NODE_HISTORY_FIELD));
    }
1135528
public function hydrate(array $objects, array $fields = array())
    {
        return $this->modelBuilder->buildAll($objects, $this->class->getManagerIdentifier(), $fields);
    }
820972
public function hydrate(array $data, $object)
    {
        $object->setId($this->getData('id', $data));
        $object->setName($this->getData('name', $data));
        $object->setType($this->getData('type', $data));
        $object->setOrdering($this->getData('ordering', $data));
        $object->setIncludePattern($this->getData('include_pattern', $data));
        $object->setExcludePattern($this->getData('exclude_pattern', $data));
        return $object;
    }
56972
public function hydrate(array $data, $object)
    {
        parent::hydrate($data, $object);
        if (isset($data['certname'])) {
            $object->setName($data['certname']);
        }
        if (isset($data['facts-timestamp'])) {
            $object->setReportedAt(new \DateTime($data['facts-timestamp']));
        }
        if (isset($data['facts-environment'])) {
            $object->setEnvironment($data['facts-environment']);
        }
        return $object;
    }