private function createYmlDriver($driverName, array $driverConfig, ContainerBuilder $container)
    {
        // Definition directories
        list($modelDir, $mixinDir, $embedDir) = $this->getDefinitionDirs($driverConfig, $container);

        // Set the directories to the dirs container parameter.
        Utility::appendParameter('dirs', sprintf('%s.model_dir', $driverName), $modelDir, $container);
        Utility::appendParameter('dirs', sprintf('%s.mixin_dir', $driverName), $mixinDir, $container);
        Utility::appendParameter('dirs', sprintf('%s.embed_dir', $driverName), $embedDir, $container);

        // File locator
        $locatorName = sprintf('%s.file_locator', $driverName);
        $locatorDef = $this->createFileLocator($modelDir, $mixinDir, $embedDir);
        $container->setDefinition($locatorName, $locatorDef);

        // Driver
        return new Definition(
            Utility::getLibraryClass('Metadata\Driver\YamlFileDriver'),
            [
                new Reference($locatorName),
                new Reference(Utility::getAliasedName('storage_manager')),
            ]
        );
    }