class LegacyExecutionContextFactory in Plug 7
Creates new {@link LegacyExecutionContext} instances.
@since 2.5 @author Bernhard Schussek <bschussek@gmail.com>
Hierarchy
- class \Symfony\Component\Validator\Context\LegacyExecutionContextFactory implements ExecutionContextFactoryInterface
Expanded class hierarchy of LegacyExecutionContextFactory
Deprecated
Implemented for backwards compatibility with Symfony < 2.5. To be removed in Symfony 3.0.
3 files declare their use of LegacyExecutionContextFactory
- LegacyValidator2Dot5ApiTest.php in lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Validator/ LegacyValidator2Dot5ApiTest.php - LegacyValidatorLegacyApiTest.php in lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Validator/ LegacyValidatorLegacyApiTest.php - ValidatorBuilder.php in lib/
Symfony/ validator/ Symfony/ Component/ Validator/ ValidatorBuilder.php
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Context/ LegacyExecutionContextFactory.php, line 27
Namespace
Symfony\Component\Validator\ContextView source
class LegacyExecutionContextFactory implements ExecutionContextFactoryInterface {
/**
* @var MetadataFactoryInterface
*/
private $metadataFactory;
/**
* @var TranslatorInterface
*/
private $translator;
/**
* @var string|null
*/
private $translationDomain;
/**
* Creates a new context factory.
*
* @param MetadataFactoryInterface $metadataFactory The metadata factory
* @param TranslatorInterface $translator The translator
* @param string|null $translationDomain The translation domain
* to use for translating
* violation messages
*/
public function __construct(MetadataFactoryInterface $metadataFactory, TranslatorInterface $translator, $translationDomain = null) {
$this->metadataFactory = $metadataFactory;
$this->translator = $translator;
$this->translationDomain = $translationDomain;
}
/**
* {@inheritdoc}
*/
public function createContext(ValidatorInterface $validator, $root) {
return new LegacyExecutionContext($validator, $root, $this->metadataFactory, $this->translator, $this->translationDomain);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LegacyExecutionContextFactory:: |
private | property | ||
LegacyExecutionContextFactory:: |
private | property | ||
LegacyExecutionContextFactory:: |
private | property | ||
LegacyExecutionContextFactory:: |
public | function |
Creates a new execution context. Overrides ExecutionContextFactoryInterface:: |
|
LegacyExecutionContextFactory:: |
public | function | Creates a new context factory. |