initial commit
This commit is contained in:
commit
0db3e92ee6
59 changed files with 3384 additions and 0 deletions
19
src/DomainObjects/Validation/Validator.php
Normal file
19
src/DomainObjects/Validation/Validator.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue