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

Breadcrumb

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

function Constraint::incrementPath

Bubble down the path

Parameters

JsonPointer|null $path Current path:

mixed $i What to append to the path:

Return value

JsonPointer;

2 calls to Constraint::incrementPath()
UndefinedConstraint::check in vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php
invokes the validation of an element
UndefinedConstraint::validateCommonProperties in vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php
Validates common properties

File

vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php, line 42

Class

Constraint
The Base Constraints, all Validators should extend this class

Namespace

JsonSchema\Constraints

Code

protected function incrementPath(?JsonPointer $path, $i) {
    $path = $path ?: new JsonPointer('');
    if ($i === null || $i === '') {
        return $path;
    }
    $path = $path->withPropertyPaths(array_merge($path->getPropertyPaths(), array(
        $i,
    )));
    return $path;
}

API Navigation

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