public function allowMaxConditions($max)
    {
        if ($this->_maxConditions) {
            throw new BadMethodCallException('You can only set the maximum conditions only once.');
        }
        $this->_maxConditions = $max;
        $this->_allowNesting = false;
        $this->checkRestrictions();
        return $this;
    }
public function allowMaxConditions($max)
    {
        if ($this->_maxConditions) {
            throw new BadMethodCallException('You can only set the maximum conditions only once.');
        }
        $this->_maxConditions = $max;
        $this->_allowNesting = false;
        $this->checkRestrictions();
        return $this;
    }
public function allowMaxConditions ( $ max ) { if ( $ this -> _maxConditions ) { throw new BadMethodCallException ( 'You can only set the maximum conditions only once.' ) ; } $ this -> _maxConditions = $ max ; $ this -> _allowNesting = false ; $ this -> checkRestrictions ( ) ; return $ this ; }
Restrict the maximum number of conditions added to this group.
CAUTION Because of the complex effects of this restriction nesting is
automatically forbidden if setting some max conditions.

@param int $max

@return self
Restrict the maximum number of conditions added to this group . CAUTION Because of the complex effects of this restriction nesting is automatically forbidden if setting some max conditions .