Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\Validator\Mapping; Chris@0: Chris@0: /** Chris@0: * Specifies whether and how a traversable object should be traversed. Chris@0: * Chris@0: * If the node traverser traverses a node whose value is an instance of Chris@0: * {@link \Traversable}, and if that node is either a class node or if Chris@0: * cascading is enabled, then the node's traversal strategy will be checked. Chris@0: * Depending on the requested traversal strategy, the node traverser will Chris@0: * iterate over the object and cascade each object or collection returned by Chris@0: * the iterator. Chris@0: * Chris@0: * The traversal strategy is ignored for arrays. Arrays are always iterated. Chris@0: * Chris@0: * @author Bernhard Schussek Chris@0: * Chris@0: * @see CascadingStrategy Chris@0: */ Chris@0: class TraversalStrategy Chris@0: { Chris@0: /** Chris@0: * Specifies that a node's value should be iterated only if it is an Chris@0: * instance of {@link \Traversable}. Chris@0: */ Chris@0: const IMPLICIT = 1; Chris@0: Chris@0: /** Chris@0: * Specifies that a node's value should never be iterated. Chris@0: */ Chris@0: const NONE = 2; Chris@0: Chris@0: /** Chris@0: * Specifies that a node's value should always be iterated. If the value is Chris@0: * not an instance of {@link \Traversable}, an exception should be thrown. Chris@0: */ Chris@0: const TRAVERSE = 4; Chris@0: Chris@0: /** Chris@0: * Not instantiable. Chris@0: */ Chris@0: private function __construct() Chris@0: { Chris@0: } Chris@0: }