protected function createConstraints($version)
    {
        switch ($version) {
            case self::VERSION_CURRENT:
            case self::VERSION_DRAFT_4:
                return $this->createBuiltInConstraints(
                    array_merge(
                        self::$commonConstraints,
                        self::$draft4Constraints
                    )
                );
            default:
                throw new UnsupportedVersionException(
                    "Schema version '{$version}' not supported"
                );
        }
    }
protected function createConstraints($version)
    {
        switch ($version) {
            case self::VERSION_CURRENT:
            case self::VERSION_DRAFT_4:
                return $this->createBuiltInConstraints(
                    array_merge(
                        self::$commonConstraints,
                        self::$draft4Constraints
                    )
                );
            default:
                throw new UnsupportedVersionException(
                    "Schema version '{$version}' not supported"
                );
        }
    }
protected function createConstraints ( $ version ) { switch ( $ version ) { case self :: VERSION_CURRENT : case self :: VERSION_DRAFT_4 : return $ this -> createBuiltInConstraints ( array_merge ( self :: $ commonConstraints , self :: $ draft4Constraints ) ) ; default : throw new UnsupportedVersionException ( "Schema version '{$version}' not supported" ) ; } }
Loads the constraints associated with a given JSON Schema version.

@param string $version

@return Constraint[]

@throws UnsupportedVersionException if the version is not supported
Loads the constraints associated with a given JSON Schema version .