getRegexp example

continue;
            }

            foreach ($value['services'] as $service) {
                $servicesToNamespaces[$service][] = $namespace;
            }
        }

        $validatorBuilder = $container->getDefinition('validator.builder');
        foreach ($container->findTaggedServiceIds('validator.auto_mapper') as $id => $tags) {
            $regexp = $this->getRegexp(array_merge($globalNamespaces$servicesToNamespaces[$id] ?? []));
            $validatorBuilder->addMethodCall('addLoader', [new Reference($id)]);
            $container->getDefinition($id)->setArgument('$classValidatorRegexp', $regexp);
        }

        $container->getParameterBag()->remove('validator.auto_mapping');
    }

    /** * Builds a regexp to check if a class is auto-mapped. */
    private function getRegexp(array $patterns): ?string
    {
continue;
            }

            foreach ($value['services'] as $service) {
                $servicesToNamespaces[$service][] = $namespace;
            }
        }

        $validatorBuilder = $container->getDefinition('validator.builder');
        foreach ($container->findTaggedServiceIds('validator.auto_mapper') as $id => $tags) {
            $regexp = $this->getRegexp(array_merge($globalNamespaces$servicesToNamespaces[$id] ?? []));
            $validatorBuilder->addMethodCall('addLoader', [new Reference($id)]);
            $container->getDefinition($id)->setArgument('$classValidatorRegexp', $regexp);
        }

        $container->getParameterBag()->remove('validator.auto_mapping');
    }

    /** * Builds a regexp to check if a class is auto-mapped. */
    private function getRegexp(array $patterns): ?string
    {
Home | Imprint | This part of the site doesn't use cookies.