public function getConstraintsForType($version, $type)
    {
        $cache = & $this->constraintsForTypeCache[$version.$type];

        if ($cache === null) {
            $cache = [];

            foreach ($this->getConstraints($version) as $constraint) {
                if ($constraint->supports($type)) {
                    $cache[] = $constraint;
                }
            }
        }

        return $cache;
    }
public function getConstraintsForType($version, $type)
    {
        $cache = & $this->constraintsForTypeCache[$version.$type];

        if ($cache === null) {
            $cache = [];

            foreach ($this->getConstraints($version) as $constraint) {
                if ($constraint->supports($type)) {
                    $cache[] = $constraint;
                }
            }
        }

        return $cache;
    }
public function getConstraintsForType ( $ version , $ type ) { $ cache = & $ this -> constraintsForTypeCache [ $ version . $ type ] ; if ( $ cache === null ) { $ cache = [ ] ; foreach ( $ this -> getConstraints ( $ version ) as $ constraint ) { if ( $ constraint -> supports ( $ type ) ) { $ cache [ ] = $ constraint ; } } } return $ cache ; }
Returns the constraints associated with a given JSON Schema version
supporting a given primitive type.

@param string $version
@param string $type

@return Constraint[]

@throws UnsupportedVersionException if the version is not supported
Returns the constraints associated with a given JSON Schema version supporting a given primitive type .