protected function validateKeywords(&$document_data, &$data, array $data_pointer, array $parent_data_pointer, ISchema $document, $schema, ValidationResult $bag): bool
    {
        // here the $ref is already resolved

        $defaults = null;
        // Set defaults if used
        if ($this->defaultSupport && is_object($data) && is_object($schema) && property_exists($schema, 'properties')) {
            foreach ($schema->properties as $property => $value) {
                if (property_exists($data, $property) || !is_object($value) || !property_exists($value, 'default')) {
                    continue;
                }
                $defaults[$property] = $this->deepClone($value->default);
            }
        }

        if (!$this->validateCommons($document_data, $data, $data_pointer, $parent_data_pointer, $document, $schema, $bag, $defaults)) {
            return false;
        }

        if (!$this->validateProperties($document_data, $data, $data_pointer, $parent_data_pointer, $document, $schema, $bag, $defaults)) {
            return false;
        }

        if (!$this->validateConditionals($document_data, $data, $data_pointer, $parent_data_pointer, $document, $schema, $bag)) {
            return false;
        }

        if ($this->filtersSupport && !$this->validateFilters($document_data, $data, $data_pointer, $parent_data_pointer, $document, $schema, $bag)) {
            return false;
        }

        return true;
    }
protected function validateKeywords(&$document_data, &$data, array $data_pointer, array $parent_data_pointer, ISchema $document, $schema, ValidationResult $bag): bool
    {
        // here the $ref is already resolved

        $defaults = null;
        // Set defaults if used
        if ($this->defaultSupport && is_object($data) && is_object($schema) && property_exists($schema, 'properties')) {
            foreach ($schema->properties as $property => $value) {
                if (property_exists($data, $property) || !is_object($value) || !property_exists($value, 'default')) {
                    continue;
                }
                $defaults[$property] = $this->deepClone($value->default);
            }
        }

        if (!$this->validateCommons($document_data, $data, $data_pointer, $parent_data_pointer, $document, $schema, $bag, $defaults)) {
            return false;
        }

        if (!$this->validateProperties($document_data, $data, $data_pointer, $parent_data_pointer, $document, $schema, $bag, $defaults)) {
            return false;
        }

        if (!$this->validateConditionals($document_data, $data, $data_pointer, $parent_data_pointer, $document, $schema, $bag)) {
            return false;
        }

        if ($this->filtersSupport && !$this->validateFilters($document_data, $data, $data_pointer, $parent_data_pointer, $document, $schema, $bag)) {
            return false;
        }

        return true;
    }
protected function validateKeywords ( & $ document_data , & $ data , array $ data_pointer , array $ parent_data_pointer , ISchema $ document , $ schema , ValidationResult $ bag ) : bool { // here the $ref is already resolved $ defaults = null ; // Set defaults if used if ( $ this -> defaultSupport && is_object ( $ data ) && is_object ( $ schema ) && property_exists ( $ schema , 'properties' ) ) { foreach ( $ schema -> properties as $ property => $ value ) { if ( property_exists ( $ data , $ property ) || ! is_object ( $ value ) || ! property_exists ( $ value , 'default' ) ) { continue ; } $ defaults [ $ property ] = $ this -> deepClone ( $ value -> default ) ; } } if ( ! $ this -> validateCommons ( $ document_data , $ data , $ data_pointer , $ parent_data_pointer , $ document , $ schema , $ bag , $ defaults ) ) { return false ; } if ( ! $ this -> validateProperties ( $ document_data , $ data , $ data_pointer , $ parent_data_pointer , $ document , $ schema , $ bag , $ defaults ) ) { return false ; } if ( ! $ this -> validateConditionals ( $ document_data , $ data , $ data_pointer , $ parent_data_pointer , $ document , $ schema , $ bag ) ) { return false ; } if ( $ this -> filtersSupport && ! $ this -> validateFilters ( $ document_data , $ data , $ data_pointer , $ parent_data_pointer , $ document , $ schema , $ bag ) ) { return false ; } return true ; }
Validates schema keywords
@param $document_data
@param $data
@param array $data_pointer
@param array $parent_data_pointer
@param ISchema $document
@param $schema
@param ValidationResult $bag
@return bool
Validates schema keywords