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\EntityCode
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]);
}
}