public function hasKeyword($version, $keyword)
    {
        $cache = & $this->keywordsCache[$version];

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

            foreach ($this->getConstraints($version) as $constraint) {
                foreach ($constraint->keywords() as $constraintKeyword) {
                    $cache[$constraintKeyword] = true;
                }
            }
        }

        return isset($cache[$keyword]);
    }
public function hasKeyword($version, $keyword)
    {
        $cache = & $this->keywordsCache[$version];

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

            foreach ($this->getConstraints($version) as $constraint) {
                foreach ($constraint->keywords() as $constraintKeyword) {
                    $cache[$constraintKeyword] = true;
                }
            }
        }

        return isset($cache[$keyword]);
    }
public function hasKeyword ( $ version , $ keyword ) { $ cache = & $ this -> keywordsCache [ $ version ] ; if ( $ cache === null ) { $ cache = [ ] ; foreach ( $ this -> getConstraints ( $ version ) as $ constraint ) { foreach ( $ constraint -> keywords ( ) as $ constraintKeyword ) { $ cache [ $ constraintKeyword ] = true ; } } } return isset ( $ cache [ $ keyword ] ) ; }
Returns whether a keyword is supported in a given JSON Schema version.

@param string $version
@param string $keyword

@return bool
Returns whether a keyword is supported in a given JSON Schema version .