4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Validator\Mapping;
15 * Specifies whether and how a traversable object should be traversed.
17 * If the node traverser traverses a node whose value is an instance of
18 * {@link \Traversable}, and if that node is either a class node or if
19 * cascading is enabled, then the node's traversal strategy will be checked.
20 * Depending on the requested traversal strategy, the node traverser will
21 * iterate over the object and cascade each object or collection returned by
24 * The traversal strategy is ignored for arrays. Arrays are always iterated.
26 * @author Bernhard Schussek <bschussek@gmail.com>
28 * @see CascadingStrategy
30 class TraversalStrategy
33 * Specifies that a node's value should be iterated only if it is an
34 * instance of {@link \Traversable}.
39 * Specifies that a node's value should never be iterated.
44 * Specifies that a node's value should always be iterated. If the value is
45 * not an instance of {@link \Traversable}, an exception should be thrown.
52 private function __construct()