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

Breadcrumb

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

function JsonPointer::__construct

Parameters

string $value:

Throws

InvalidArgumentException when $value is not a string

File

vendor/justinrainbow/json-schema/src/JsonSchema/Entity/JsonPointer.php, line 37

Class

JsonPointer
@package JsonSchema\Entity

Namespace

JsonSchema\Entity

Code

public function __construct($value) {
    if (!is_string($value)) {
        throw new InvalidArgumentException('Ref value must be a string');
    }
    $splitRef = explode('#', $value, 2);
    $this->filename = $splitRef[0];
    if (array_key_exists(1, $splitRef)) {
        $this->propertyPaths = $this->decodePropertyPaths($splitRef[1]);
    }
}

API Navigation

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