public function setParserOption($parserName, $key, $value = null)
    {
        if (!isset($this->parserOptions[$parserName])) {
            $this->parserOptions[$parserName] = [];
        }

        if (!is_array($key)) {
            $this->parserOptions[$parserName][$key] = $value;

            return $this;
        }

        foreach ($key as $name => $value) {
            $this->setParserOption($parserName, $name, $value);
        }

        return $this;
    }
public function setParserOption($parserName, $key, $value = null)
    {
        if (!isset($this->parserOptions[$parserName])) {
            $this->parserOptions[$parserName] = [];
        }

        if (!is_array($key)) {
            $this->parserOptions[$parserName][$key] = $value;

            return $this;
        }

        foreach ($key as $name => $value) {
            $this->setParserOption($parserName, $name, $value);
        }

        return $this;
    }
public function setParserOption ( $ parserName , $ key , $ value = null ) { if ( ! isset ( $ this -> parserOptions [ $ parserName ] ) ) { $ this -> parserOptions [ $ parserName ] = [ ] ; } if ( ! is_array ( $ key ) ) { $ this -> parserOptions [ $ parserName ] [ $ key ] = $ value ; return $ this ; } foreach ( $ key as $ name => $ value ) { $ this -> setParserOption ( $ parserName , $ name , $ value ) ; } return $ this ; }
Set a parser option.

@param string       $parserName
@param string|array $key
@param mixed        $value

@return self
Set a parser option .