src/Valdi/Validator.php
protected function createValidators(array $validators) {
        $this->availableValidators = [];
        foreach ($validators as $name => $type) {
            $class                            = '\\Valdi\\Validator\\'.$type;
            $this->availableValidators[$name] = new $class();
        }
    }
protected function createValidators(array $validators) {
        $this->availableValidators = [];
        foreach ($validators as $name => $type) {
            $class                            = '\\Valdi\\Validator\\'.$type;
            $this->availableValidators[$name] = new $class();
        }
    }
protected function createValidators ( array $ validators ) { $ this -> availableValidators = [ ] ; foreach ( $ validators as $ name => $ type ) { $ class = '\\Valdi\\Validator\\' . $ type ; $ this -> availableValidators [ $ name ] = new $ class ( ) ; } }
Creates instances of the available validators.

@param array $validators
the validators to load, key = name, value = classname within the
namespace "\Valdi\Validator"
Creates instances of the available validators .