mirror of
https://github.com/cerbero90/json-parser.git
synced 2025-07-15 19:26:35 +02:00
Add method to mark pointers as found
This commit is contained in:
@ -76,6 +76,19 @@ class Pointers implements Countable
|
||||
return end($pointers) ?: $this->defaultPointer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark the given pointer as found
|
||||
*
|
||||
* @param Pointer $pointer
|
||||
* @return void
|
||||
*/
|
||||
public function markAsFound(Pointer $pointer): void
|
||||
{
|
||||
$key = (string) $pointer;
|
||||
|
||||
$this->found[$key] = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether all pointers were found within the JSON
|
||||
*
|
||||
|
Reference in New Issue
Block a user