Mercurial > hg > cmmr2012-drupal-site
comparison vendor/symfony/validator/Mapping/TraversalStrategy.php @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c75dbcec494b |
---|---|
1 <?php | |
2 | |
3 /* | |
4 * This file is part of the Symfony package. | |
5 * | |
6 * (c) Fabien Potencier <fabien@symfony.com> | |
7 * | |
8 * For the full copyright and license information, please view the LICENSE | |
9 * file that was distributed with this source code. | |
10 */ | |
11 | |
12 namespace Symfony\Component\Validator\Mapping; | |
13 | |
14 /** | |
15 * Specifies whether and how a traversable object should be traversed. | |
16 * | |
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 | |
22 * the iterator. | |
23 * | |
24 * The traversal strategy is ignored for arrays. Arrays are always iterated. | |
25 * | |
26 * @author Bernhard Schussek <bschussek@gmail.com> | |
27 * | |
28 * @see CascadingStrategy | |
29 */ | |
30 class TraversalStrategy | |
31 { | |
32 /** | |
33 * Specifies that a node's value should be iterated only if it is an | |
34 * instance of {@link \Traversable}. | |
35 */ | |
36 const IMPLICIT = 1; | |
37 | |
38 /** | |
39 * Specifies that a node's value should never be iterated. | |
40 */ | |
41 const NONE = 2; | |
42 | |
43 /** | |
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. | |
46 */ | |
47 const TRAVERSE = 4; | |
48 | |
49 /** | |
50 * Not instantiable. | |
51 */ | |
52 private function __construct() | |
53 { | |
54 } | |
55 } |