You are here

public function ExecutionContext::getRoot in Plug 7

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

Returns the value at which validation was started in the object graph.

The validator, when given an object, traverses the properties and related objects and their properties. The root of the validation is the object from which the traversal started.

The current value is returned by {@link getValue}.

Return value

mixed The root value of the validation.

Overrides ExecutionContextInterface::getRoot

File

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

Class

ExecutionContext
Default implementation of {@link ExecutionContextInterface}.

Namespace

Symfony\Component\Validator

Code

public function getRoot() {
  return $this->globalContext
    ->getRoot();
}