19 lines
No EOL
495 B
PHP
19 lines
No EOL
495 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace VeruA\DomainObjects\Validation;
|
|
|
|
interface Validator
|
|
{
|
|
/**
|
|
* Returnst the instances of the validator, instantiates a new one if there isn't one already.
|
|
* @return Validator
|
|
*/
|
|
public static function getInstance(): Validator;
|
|
|
|
/**
|
|
* Validates a DomainObject.
|
|
* @param Validatable $object
|
|
* @return ResultCollection|bool returns true if validations passed a ResultCollection otherwise
|
|
*/
|
|
public function validate(Validatable $object);
|
|
} |