mirror of
https://github.com/cerbero90/json-parser.git
synced 2025-04-15 08:15:10 +02:00
Add method to mark pointers as found
This commit is contained in:
parent
82c70b7374
commit
aa778dacac
@ -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
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user