You are here

public function ExecutionContext::__construct in Plug 7

Same name in this branch
  1. 7 lib/Symfony/validator/Symfony/Component/Validator/ExecutionContext.php \Symfony\Component\Validator\ExecutionContext::__construct()
  2. 7 lib/Symfony/validator/Symfony/Component/Validator/Context/ExecutionContext.php \Symfony\Component\Validator\Context\ExecutionContext::__construct()

Creates a new execution context.

Parameters

GlobalExecutionContextInterface $globalContext The global context storing node-independent state.:

TranslatorInterface $translator The translator for translating violation messages.:

null|string $translationDomain The domain of the validation messages.:

MetadataInterface $metadata The metadata of the validated node.:

mixed $value The value of the validated node.:

string $group The current validation group.:

string $propertyPath The property path to the current node.:

File

lib/Symfony/validator/Symfony/Component/Validator/ExecutionContext.php, line 75

Class

ExecutionContext
Default implementation of {@link ExecutionContextInterface}.

Namespace

Symfony\Component\Validator

Code

public function __construct(GlobalExecutionContextInterface $globalContext, TranslatorInterface $translator, $translationDomain = null, MetadataInterface $metadata = null, $value = null, $group = null, $propertyPath = '') {
  if (null === $group) {
    $group = Constraint::DEFAULT_GROUP;
  }
  $this->globalContext = $globalContext;
  $this->translator = $translator;
  $this->translationDomain = $translationDomain;
  $this->metadata = $metadata;
  $this->value = $value;
  $this->propertyPath = $propertyPath;
  $this->group = $group;
}