Symfony\Component\Validator\ValidationVisitorInterface
Validates values against constraints defined in {@link MetadataInterface} instances.
This interface is an implementation of the Visitor design pattern. A value
is validated by first passing it to the method. That method
will determine the matching for validating the
value. It then calls the method of that
metadata. <tt>accept()</tt> does two things:
<ol>
<li>It calls to validate the value against the constraints of
the metadata.</li>
<li>It calls <tt>accept()</tt> on all nested metadata instances with the
corresponding values extracted from the current value. For example, if the
current metadata represents a class and the current value is an object of
that class, the metadata contains nested instances for each property of that
class. It forwards the call to these nested metadata with the values of the
corresponding properties in the original object.</li>
</ol>
- Author: Bernhard Schussek <bschussek@gmail.com>
Synopsis
Methods
public
- validate() — Validates a value.
- visit() — Validates a value against the constraints defined in some metadata.