public function addMany(array $rules, $prefix = null)
    {
        foreach ($rules as $type => $rule) {
            $type = $this->_getName($type, $prefix);

            if ($rule instanceof Rule) {
                $this->add($type, $rule);
            } elseif (is_array($rule)) {
                $this->addMany($rule, $type);
            } else {
                throw new \LogicException('Array values has to be either arrays of rules or rules.');
            }
        }
    }