Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Hydrator.php

function Hydrator::hydrate

Same name in this branch
  1. 11.1.x vendor/symfony/var-exporter/Hydrator.php \Symfony\Component\VarExporter\Hydrator::hydrate()

File

vendor/symfony/var-exporter/Internal/Hydrator.php, line 36

Class

Hydrator
@author Nicolas Grekas <p@tchwork.com>

Namespace

Symfony\Component\VarExporter\Internal

Code

public static function hydrate($objects, $values, $properties, $value, $wakeups) {
    foreach ($properties as $class => $vars) {
        (self::$hydrators[$class] ??= self::getHydrator($class))($vars, $objects);
    }
    foreach ($wakeups as $k => $v) {
        if (\is_array($v)) {
            $objects[-$k]->__unserialize($v);
        }
        else {
            $objects[$v]->__wakeup();
        }
    }
    return $value;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal