Register an array of custom implicit validator extensions.

@param array $extensions
196916
public function addImplicitExtensions(array $extensions)
    {
        $this->addExtensions($extensions);

        foreach ($extensions as $rule => $extension) {
            $this->implicitRules[] = studly_case($rule);
        }
    }
24510
public void registerExtensions(final Class<?>... extensions) {
        for (Class<?> extension : extensions) {
            register(ConfigItem.Extension, extension);
        }
    }
960280
protected function getMimesByExtensions(array $extensions)
    {
        $output = [];
        foreach ($extensions as $ext) {
            if (($mime = $this->getMimeByExtension($ext)) === false) {
                return false;
            }
            if (is_array($mime)) {
                $output = array_merge($output, $mime);
            } else {
                $output[] = $mime;
            }
        }

        return $output;
    }
157043
public function addExtension(Twig_ExtensionInterface $extension)
    {
        if ($this->extensionInitialized) {
            throw new LogicException(sprintf('Unable to register extension "%s" as extensions have already been initialized.', $extension->getName()));
        }

        $this->extensions[$extension->getName()] = $extension;
    }
834035
public function registerExtension(common_ext_Extension $extension)
    {
        $entry = array(
        	'installed' => $extension->getManifest()->getVersion(),
            'enabled' => false 
        );
        $extensions = $this->getExtensionById('generis')->getConfig(self::EXTENSIONS_CONFIG_KEY);
        $extensions[$extension->getId()] = $entry;
        return $this->getExtensionById('generis')->setConfig(self::EXTENSIONS_CONFIG_KEY, $extensions);
    }
552805
public function addExtensions($extensions)
    {
        $extensions = array_merge($this->_extensions, (array)$extensions);
        $this->_extensions = array_unique($extensions);
    }
363434
public function registerExtensionProviders(ExtensionContract $extension)
    {
        $filePath = $extension->getPath() . '/providers.php';

        if ($this->files->exists($filePath)) {
            $providers = (array) $this->files->getRequire($filePath);

            $this->provides($providers);
        }
    }
586225
private function validatePersisters(array $persisters)
    {
        foreach ($persisters as $name => $config) {
            $this->validateTypeAndService($config, sprintf('as3_modlr.persisters.%s', $name));
            switch ($config['type']) {
                case 'mongodb':
                    $this->validateLibClassExists('Persister\MongoDb\Persister', sprintf('as3_modlr.persisters.%s.type', $name));
                    $this->validatePersisterMongoDb($config);
                    break;
                default:
                    break;
            }
        }
    }
478681
def _register_extensions(self, namespace):
        """"""

        # Register any extension classes for this class.
        extmanager = ExtensionManager(
            'extensions.classes.{}'.format(namespace),
            propagate_map_exceptions=True
        )

        if extmanager.extensions:
            extmanager.map(util.register_extension_class, base=self)

        # Register any extension methods for this class.
        extmanager = ExtensionManager(
            'extensions.methods.{}'.format(namespace),
            propagate_map_exceptions=True
        )
        if extmanager.extensions:
            extmanager.map(util.register_extension_method, base=self)
1234971
public function withAllowedExtensions(array $extensions) {
		if (\is_array($extensions) && !empty($extensions)) {
			$extensions = \array_map('trim', $extensions);
			$extensions = \array_map('strtolower', $extensions);

			$this->allowedExtensions = $extensions;
		}

		return $this;
	}
418735
private function setPrefixes( array $prefixes ) {
		foreach ( $prefixes as $prefix => $iri ) {
			$this->expressionValidator->validate( $prefix, ExpressionValidator::VALIDATE_PREFIX );
			$this->expressionValidator->validate( $iri, ExpressionValidator::VALIDATE_IRI );

			$this->prefixes[$prefix] = $iri;
		}

		$this->usageValidator->trackDefinedPrefixes( array_keys( $this->prefixes ) );
	}
677927
protected function registerExtensions()
    {
        // Bind extension manager as singleton,
        // so user can call it and add own extensions
        $this->app->singleton(ExtensionManager::class, function ($app) {

            $manager = new ExtensionManager(
                $this->app[ManagerRegistry::class],
                $this->app[Dispatcher::class]
            );

            if ($this->config['gedmo_extensions']['enabled']) {
                $manager->enableGedmoExtensions(
                    $this->config['meta']['namespaces'],
                    $this->config['gedmo_extensions']['all_mappings']
                );
            }

            // Register the extensions
            foreach ($this->config['extensions'] as $extension) {
                if (!class_exists($extension)) {
                    throw new ExtensionNotFound("Extension {$extension} not found");
                }

                $manager->register(
                    $app->make($extension)
                );
            }

            return $manager;
        });
    }
1015007
public static function clean_file_extensions($extensions) {

        debugging('The method workshop::clean_file_extensions() is deprecated.
            Please use the methods provided by the \core_form\filetypes_util class.', DEBUG_DEVELOPER);

        $extensions = self::normalize_file_extensions($extensions);

        foreach ($extensions as $i => $extension) {
            $extensions[$i] = ltrim($extension, '.');
        }

        return implode(', ', $extensions);
    }
591441
protected function addExtensions(Validator $validator)
    {
        $validator->addExtensions($this->extensions);

        // Next, we will add the implicit extensions, which are similar to the required
        // and accepted rule in that they are run even if the attributes is not in a
        // array of data that is given to a validator instances via instantiation.
        $validator->addImplicitExtensions($this->implicitExtensions);

        $validator->addDependentExtensions($this->dependentExtensions);

        $validator->addReplacers($this->replacers);

        $validator->setFallbackMessages($this->fallbackMessages);
    }
148160
public function registerFilter($extension, $filter)
    {
        if (is_array($extension)) {
            foreach ($extension as $_extension) {
                $this->registerFilter($_extension, $filter);
            }
            return;
        }

        $extension = strtolower($extension);

        if (!isset($this->filters[$extension])) {
            $this->filters[$extension] = [];
        }

        if ($filter !== null) {
            $this->filters[$extension][] = $filter;
        }

        return $this;
    }
769435
public function validateProviders(array $providers) : void
    {
        Assert::allClassExists($providers);
        Assert::allImplementsInterface($providers, self::PROVIDER_INTERFACE);

        foreach ($this->requiredProviders as $name) {
            if (!in_array($name, array_keys($providers))) {
                throw new InvalidArgumentException("Configuration is missing a required provider for [$name]");
            }
        }
    }
704450
private static function addExtensions(ContainerBuilder $container, array $extensions)
    {
        $resolved = [];

        foreach ($extensions as $extClass) {
            if (!class_exists($extClass)) {
                throw new RuntimeException("Symfony DI Extension not found: \"${extClass}\"");
            }

            $resolved[] = new $extClass;
        }

        foreach ($resolved as $ext) {
            $container->registerExtension($ext);
        }

        return $resolved;
    }