class ExecutionContextFactory in Zircon Profile 8
Same name in this branch
- 8 vendor/symfony/validator/Context/ExecutionContextFactory.php \Symfony\Component\Validator\Context\ExecutionContextFactory
- 8 core/lib/Drupal/Core/TypedData/Validation/ExecutionContextFactory.php \Drupal\Core\TypedData\Validation\ExecutionContextFactory
Same name and namespace in other branches
- 8.0 vendor/symfony/validator/Context/ExecutionContextFactory.php \Symfony\Component\Validator\Context\ExecutionContextFactory
Creates new {@link ExecutionContext} instances.
@since 2.5
@author Bernhard Schussek <bschussek@gmail.com>
@internal You should not instantiate or use this class. Code against {@link ExecutionContextFactoryInterface} instead.
Hierarchy
- class \Symfony\Component\Validator\Context\ExecutionContextFactory implements ExecutionContextFactoryInterface
Expanded class hierarchy of ExecutionContextFactory
2 files declare their use of ExecutionContextFactory
- RecursiveValidator2Dot5ApiTest.php in vendor/
symfony/ validator/ Tests/ Validator/ RecursiveValidator2Dot5ApiTest.php - ValidatorBuilder.php in vendor/
symfony/ validator/ ValidatorBuilder.php
File
- vendor/
symfony/ validator/ Context/ ExecutionContextFactory.php, line 27
Namespace
Symfony\Component\Validator\ContextView source
class ExecutionContextFactory implements ExecutionContextFactoryInterface {
/**
* @var TranslatorInterface
*/
private $translator;
/**
* @var string|null
*/
private $translationDomain;
/**
* Creates a new context factory.
*
* @param TranslatorInterface $translator The translator
* @param string|null $translationDomain The translation domain to
* use for translating
* violation messages
*/
public function __construct(TranslatorInterface $translator, $translationDomain = null) {
$this->translator = $translator;
$this->translationDomain = $translationDomain;
}
/**
* {@inheritdoc}
*/
public function createContext(ValidatorInterface $validator, $root) {
return new ExecutionContext($validator, $root, $this->translator, $this->translationDomain);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ExecutionContextFactory:: |
private | property | ||
ExecutionContextFactory:: |
private | property | ||
ExecutionContextFactory:: |
public | function |
Creates a new execution context. Overrides ExecutionContextFactoryInterface:: |
|
ExecutionContextFactory:: |
public | function | Creates a new context factory. |