-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
262 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yakimun\JsonSchemaValidator; | ||
|
||
use Psr\Http\Message\UriInterface; | ||
|
||
/** | ||
* @psalm-immutable | ||
*/ | ||
final class SchemaAnchor | ||
{ | ||
/** | ||
* @var UriInterface | ||
*/ | ||
private UriInterface $uri; | ||
|
||
/** | ||
* @var bool | ||
*/ | ||
private bool $dynamic; | ||
|
||
/** | ||
* @var JsonPointer | ||
*/ | ||
private JsonPointer $path; | ||
|
||
/** | ||
* @param UriInterface $uri | ||
* @param bool $dynamic | ||
* @param JsonPointer $path | ||
*/ | ||
public function __construct(UriInterface $uri, bool $dynamic, JsonPointer $path) | ||
{ | ||
$this->uri = $uri; | ||
$this->dynamic = $dynamic; | ||
$this->path = $path; | ||
} | ||
|
||
/** | ||
* @return UriInterface | ||
*/ | ||
public function getUri(): UriInterface | ||
{ | ||
return $this->uri; | ||
} | ||
|
||
/** | ||
* @return bool | ||
*/ | ||
public function isDynamic(): bool | ||
{ | ||
return $this->dynamic; | ||
} | ||
|
||
/** | ||
* @return JsonPointer | ||
*/ | ||
public function getPath(): JsonPointer | ||
{ | ||
return $this->path; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.