src/ViKon/Parser/Parser.php
public function addRule(AbstractRule $rule) {
        if (array_key_exists($rule->getName(), $this->rules)) {
            throw new ParserException('Rule with ' . $rule->getName() . ' name already exists');
        }

        $this->rules[$rule->getName()] = $rule;

        return $this;
    }
public function addRule(AbstractRule $rule) {
        if (array_key_exists($rule->getName(), $this->rules)) {
            throw new ParserException('Rule with ' . $rule->getName() . ' name already exists');
        }

        $this->rules[$rule->getName()] = $rule;

        return $this;
    }
public function addRule ( AbstractRule $ rule ) { if ( array_key_exists ( $ rule -> getName ( ) , $ this -> rules ) ) { throw new ParserException ( 'Rule with ' . $ rule -> getName ( ) . ' name already exists' ) ; } $ this -> rules [ $ rule -> getName ( ) ] = $ rule ; return $ this ; }
Add rule to parser

@param \ViKon\Parser\Rule\AbstractRule $rule rule instance

@throws \ViKon\Parser\ParserException throws if rule already exists with same name

@return $this
Add rule to parser