Parser/Rules.php
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.');
            }
        }
    }
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.');
            }
        }
    }
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.' ) ; } } }
Adds array of rules

@param array       $rules
@param string|null $prefix

@throws \LogicException
Adds array of rules