* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Constraints; /** * A sequence of validation groups. * * When validating a group sequence, each group will only be validated if all * of the previous groups in the sequence succeeded. For example: * * $validator->validate($address, null, new GroupSequence(array('Basic', 'Strict'))); * * In the first step, all constraints that belong to the group "Basic" will be * validated. If none of the constraints fail, the validator will then validate * the constraints in group "Strict". This is useful, for example, if "Strict" * contains expensive checks that require a lot of CPU or slow, external * services. You usually don't want to run expensive checks if any of the cheap * checks fail. * * When adding metadata to a class, you can override the "Default" group of * that class with a group sequence: * * /** * * @GroupSequence({"Address", "Strict"}) * *\/ * class Address * { * // ... * } * * Whenever you validate that object in the "Default" group, the group sequence * will be validated: * * $validator->validate($address); * * If you want to execute the constraints of the "Default" group for a class * with an overridden default group, pass the class name as group name instead: * * $validator->validate($address, null, "Address") * * @Annotation * @Target({"CLASS", "ANNOTATION"}) * * @author Bernhard Schussek */ class GroupSequence { /** * The groups in the sequence. * * @var string[]|array[]|GroupSequence[] */ public $groups; /** * The group in which cascaded objects are validated when validating * this sequence. * * By default, cascaded objects are validated in each of the groups of * the sequence. * * If a class has a group sequence attached, that sequence replaces the * "Default" group. When validating that class in the "Default" group, the * group sequence is used instead, but still the "Default" group should be * cascaded to other objects. * * @var string|GroupSequence */ public $cascadedGroup; /** * Creates a new group sequence. * * @param string[] $groups The groups in the sequence */ public function __construct(array $groups) { // Support for Doctrine annotations $this->groups = isset($groups['value']) ? $groups['value'] : $groups; } } __halt_compiler();----SIGNATURE:----Gm44mIF6vQ4akRQxBn33J2W5714jWU+Zda0VukESaSnBtFqSspNDeBaf5jXSSB1igGLEaiHEqGmGtj4/TR4uQxAQPx9/DxRHGXFvml28HAQg0vW99StTpCwz5y3mRyUvOUvxJprUFvf5D67wmJZQ/OewIt6GdFeqbmSSccfQ32SsR1BBR7M0ag20FdyqEbwsi1DEv5RWnn0LuNijfZHmIaaUsZUoGdvnVqW2qMt4JW/4ZTPtE5kbbzqv1zUr8Chl8ksHypllffVs/dkXxkMfjOv5JlFc0ehycyXsBkIaj1arGJoAOYHkkT1cY/1Z0++5WtTZ8w45lxNXWETMWbWcD2C4/bZvav8qFn1uj3sgVzrQahLYVOUg82PBr6i2d7TZtwGjSWLbIkkXaecM4jQUEIvT3qZh2jT/nvv033fk87ALz5feuuh8Fp1ErKixDNckIqmUg4CtMRelJDX7o7dfBG439uJlGTBEZgM+ksl/q1ig+mtLhWubFW2DrdKwTihspZ7a6rxpd9eeQk8e8MT/zdh5sn8YRUdOAviGj2gmHVVU8gdB7vWfs/Z8oHhbKEtRq03wmcmX6HPl6RktSRIaR9x80Dw6zj1Ci2SXRVw2TDD0RBU/691bLrkwAOsdQQEnVOZdXThrEHGkLxKT/wmzVkf9FnjQ7zNHdPdETSlnb0o=----ATTACHMENT:----MTMzMDY4NDE2NzI0MzEzIDk4NzU5NDc3Mjc2NTM0OTkgNjYyODExMDUxNzc3Mzc1Mg==