You are here

public function ExecutionContext::getMetadataFactory in Plug 7

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

Returns the used metadata factory.

Return value

MetadataFactoryInterface The metadata factory.

Overrides ExecutionContextInterface::getMetadataFactory

Deprecated

Deprecated since version 2.5, to be removed in Symfony 3.0. Use {@link Context\ExecutionContextInterface::getValidator()} instead and call {@link Validator\ValidatorInterface::getMetadataFor()} or {@link Validator\ValidatorInterface::hasMetadataFor()} there.

File

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

Class

ExecutionContext
Default implementation of {@link ExecutionContextInterface}.

Namespace

Symfony\Component\Validator

Code

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