lib/Accessible/Reader/ConstraintsReader.php
public static function isConstraintsValidationEnabled($objectClasses, $annotationReader)
    {
        $enabled = Configuration::isConstraintsValidationEnabled();

        foreach ($objectClasses as $class) {
            if ($annotationReader->getClassAnnotation($class, self::$disableConstraintsValidationAnnotationClass) !== null) {
                $enabled = false;
                break;
            }
            if ($annotationReader->getClassAnnotation($class, self::$enableConstraintsValidationAnnotationClass) !== null) {
                $enabled = true;
                break;
            }
        }

        return $enabled;
    }
public static function isConstraintsValidationEnabled($objectClasses, $annotationReader)
    {
        $enabled = Configuration::isConstraintsValidationEnabled();

        foreach ($objectClasses as $class) {
            if ($annotationReader->getClassAnnotation($class, self::$disableConstraintsValidationAnnotationClass) !== null) {
                $enabled = false;
                break;
            }
            if ($annotationReader->getClassAnnotation($class, self::$enableConstraintsValidationAnnotationClass) !== null) {
                $enabled = true;
                break;
            }
        }

        return $enabled;
    }
public static function isConstraintsValidationEnabled ( $ objectClasses , $ annotationReader ) { $ enabled = Configuration :: isConstraintsValidationEnabled ( ) ; foreach ( $ objectClasses as $ class ) { if ( $ annotationReader -> getClassAnnotation ( $ class , self :: $ disableConstraintsValidationAnnotationClass ) !== null ) { $ enabled = false ; break ; } if ( $ annotationReader -> getClassAnnotation ( $ class , self :: $ enableConstraintsValidationAnnotationClass ) !== null ) { $ enabled = true ; break ; } } return $ enabled ; }
Indicates wether the constraints validation is enabled or not for the given object.

@param array  $objectClasses The classes of the object to read.
@param \Doctrine\Common\Annotations\Reader $annotationReader The annotation reader to use.

@return boolean True if the validation is enabled, else false.
Indicates wether the constraints validation is enabled or not for the given object .