validators = new \SplObjectStorage(); $this->validatedInstancesContainer = new \SplObjectStorage(); } /** * Checks if the given value is valid according to the validators of the conjunction. * Every validator has to be valid, to make the whole conjunction valid. * * @param mixed $value The value that should be validated */ public function validate(mixed $value): Result { $result = new Result(); foreach ($this->getValidators() as $validator) { $result->merge($validator->validate($value)); } return $result; } }