public function generateHydratorClasses(array $classes, ?string $toDir = null) : void
    {
        $hydratorDir = $toDir ?: $this->hydratorDir;
        $hydratorDir = rtrim($hydratorDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
        foreach ($classes as $class) {
            $hydratorClassName = str_replace('\\', '', $class->name) . 'Hydrator';
            $hydratorFileName  = $hydratorDir . $hydratorClassName . '.php';
            $this->generateHydratorClass($class, $hydratorClassName, $hydratorFileName);
        }
    }
public function generateHydratorClasses(array $classes, ?string $toDir = null) : void
    {
        $hydratorDir = $toDir ?: $this->hydratorDir;
        $hydratorDir = rtrim($hydratorDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
        foreach ($classes as $class) {
            $hydratorClassName = str_replace('\\', '', $class->name) . 'Hydrator';
            $hydratorFileName  = $hydratorDir . $hydratorClassName . '.php';
            $this->generateHydratorClass($class, $hydratorClassName, $hydratorFileName);
        }
    }
public function generateHydratorClasses ( array $ classes , ? string $ toDir = null ) : void { $ hydratorDir = $ toDir ? : $ this -> hydratorDir ; $ hydratorDir = rtrim ( $ hydratorDir , DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR ; foreach ( $ classes as $ class ) { $ hydratorClassName = str_replace ( '\\' , '' , $ class -> name ) . 'Hydrator' ; $ hydratorFileName = $ hydratorDir . $ hydratorClassName . '.php' ; $ this -> generateHydratorClass ( $ class , $ hydratorClassName , $ hydratorFileName ) ; } }
Generates hydrator classes for all given classes.

@param array  $classes The classes (ClassMetadata instances) for which to generate hydrators.
@param string $toDir   The target directory of the hydrator classes. If not specified, the
directory configured on the Configuration of the DocumentManager used
by this factory is used.
Generates hydrator classes for all given classes .