mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-14 15:56:48 +03:00
Migrate isValid() to Validator and ValidatorInterface
* Maintain backwards compatibility with the former Uuid::isValid() and Uuid::VALID_PATTERN * Remove the assert statements in favor of str_replace and preg_match * Make the validator a featureset of the factory * Remove old suggestion about locations of constants * Remove argument count assertions * Remove VALID_PATTERN from Uuid
This commit is contained in:
committed by
Ben Ramsey
parent
6f3316a1f7
commit
3cf759ad05
@@ -18,6 +18,7 @@ use Exception;
|
||||
use InvalidArgumentException;
|
||||
use Ramsey\Uuid\Exception\InvalidUuidStringException;
|
||||
use Ramsey\Uuid\Exception\UnsatisfiedDependencyException;
|
||||
use Ramsey\Uuid\Validator\ValidatorInterface;
|
||||
|
||||
/**
|
||||
* UuidFactoryInterface defines common functionality all `UuidFactory` instances
|
||||
@@ -25,6 +26,11 @@ use Ramsey\Uuid\Exception\UnsatisfiedDependencyException;
|
||||
*/
|
||||
interface UuidFactoryInterface
|
||||
{
|
||||
/**
|
||||
* @return ValidatorInterface
|
||||
*/
|
||||
public function getValidator();
|
||||
|
||||
/**
|
||||
* Generate a version 1 UUID from a host ID, sequence number, and the current time.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user