private function getValidation(string $name): validator\Validation
    {
        if (!isset($this->validations[$name])) {
            if (isset($this->validationRegister[$name])) {
                $class = $this->validationRegister[$name];
            } else {
                throw new exceptions\ValidatorException("Validator [$name] not found");
            }

            $params = isset($this->validationData[$name]) ? $this->validationData[$name] : null;
            $this->validations[$name] = new $class($params);
        }
        return $this->validations[$name];
    }
private function getValidation(string $name): validator\Validation
    {
        if (!isset($this->validations[$name])) {
            if (isset($this->validationRegister[$name])) {
                $class = $this->validationRegister[$name];
            } else {
                throw new exceptions\ValidatorException("Validator [$name] not found");
            }

            $params = isset($this->validationData[$name]) ? $this->validationData[$name] : null;
            $this->validations[$name] = new $class($params);
        }
        return $this->validations[$name];
    }
private function getValidation ( string $ name ) : validator \ Validation { if ( ! isset ( $ this -> validations [ $ name ] ) ) { if ( isset ( $ this -> validationRegister [ $ name ] ) ) { $ class = $ this -> validationRegister [ $ name ] ; } else { throw new exceptions \ ValidatorException ( "Validator [$name] not found" ) ; } $ params = isset ( $ this -> validationData [ $ name ] ) ? $ this -> validationData [ $ name ] : null ; $ this -> validations [ $ name ] = new $ class ( $ params ) ; } return $ this -> validations [ $ name ] ; }
Get an instance of a validation class.

@param string $name
@return validator\Validation
@throws exceptions\ValidatorException
Get an instance of a validation class .