Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UndefinedConstraint.php

function UndefinedConstraint::check

Overrides ConstraintInterface::check

File

vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php, line 34

Class

UndefinedConstraint
The UndefinedConstraint Constraints

Namespace

JsonSchema\Constraints

Code

public function check(&$value, $schema = null, ?JsonPointer $path = null, $i = null, $fromDefault = false) {
    if (is_null($schema) || !is_object($schema)) {
        return;
    }
    $path = $this->incrementPath($path ?: new JsonPointer(''), $i);
    if ($fromDefault) {
        $path->setFromDefault();
    }
    // check special properties
    $this->validateCommonProperties($value, $schema, $path, $i);
    // check allOf, anyOf, and oneOf properties
    $this->validateOfProperties($value, $schema, $path, '');
    // check known types
    $this->validateTypes($value, $schema, $path, $i);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal