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.

1 method overrides ExecutionContext::getMetadataFactory()
LegacyExecutionContext::getMetadataFactory in lib/Symfony/validator/Symfony/Component/Validator/Context/LegacyExecutionContext.php
Returns the used metadata factory.

File

lib/Symfony/validator/Symfony/Component/Validator/Context/ExecutionContext.php, line 344

Class

ExecutionContext
The context used and created by {@link ExecutionContextFactory}.

Namespace

Symfony\Component\Validator\Context

Code

public function getMetadataFactory() {
  throw new BadMethodCallException('getMetadataFactory() is not supported anymore as of Symfony 2.5. ' . 'Please use getValidator() in combination with getMetadataFor() ' . 'or hasMetadataFor() instead or enable the legacy mode.');
}