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 an object should be cascaded. Chris@0: * Chris@0: * Cascading is relevant for any node type but class nodes. If such a node Chris@0: * contains an object of value, and if cascading is enabled, then the node Chris@0: * traverser will try to find class metadata for that object and validate the Chris@0: * object against that metadata. Chris@0: * Chris@0: * If no metadata is found for a cascaded object, and if that object implements Chris@0: * {@link \Traversable}, the node traverser will iterate over the object and Chris@0: * cascade each object or collection contained within, unless iteration is Chris@0: * prohibited by the specified {@link TraversalStrategy}. Chris@0: * Chris@0: * Although the constants currently represent a boolean switch, they are Chris@0: * implemented as bit mask in order to allow future extensions. Chris@0: * Chris@0: * @author Bernhard Schussek Chris@0: * Chris@0: * @see TraversalStrategy Chris@0: */ Chris@0: class CascadingStrategy Chris@0: { Chris@0: /** Chris@0: * Specifies that a node should not be cascaded. Chris@0: */ Chris@0: const NONE = 1; Chris@0: Chris@0: /** Chris@0: * Specifies that a node should be cascaded. Chris@0: */ Chris@0: const CASCADE = 2; Chris@0: Chris@0: /** Chris@0: * Not instantiable. Chris@0: */ Chris@0: private function __construct() Chris@0: { Chris@0: } Chris@0: }