Assessment-Ben/src/DomainObjects/Validation/Validator.php
2025-12-17 21:38:05 +01:00

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);
}