You are here

public function ValidatorBuilder::addObjectInitializer in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/ValidatorBuilder.php \Symfony\Component\Validator\ValidatorBuilder::addObjectInitializer()

Adds an object initializer to the validator.

Parameters

ObjectInitializerInterface $initializer The initializer:

Return value

ValidatorBuilderInterface The builder object

Overrides ValidatorBuilderInterface::addObjectInitializer

File

vendor/symfony/validator/ValidatorBuilder.php, line 100

Class

ValidatorBuilder
The default implementation of {@link ValidatorBuilderInterface}.

Namespace

Symfony\Component\Validator

Code

public function addObjectInitializer(ObjectInitializerInterface $initializer) {
  $this->initializers[] = $initializer;
  return $this;
}