public function addScanner($name, $scanner)
    {
        $this->filterScanner($scanner);

        return $this->setOption(['scanners', $name], $scanner);
    }
public function addScanner($name, $scanner)
    {
        $this->filterScanner($scanner);

        return $this->setOption(['scanners', $name], $scanner);
    }
public function addScanner ( $ name , $ scanner ) { $ this -> filterScanner ( $ scanner ) ; return $ this -> setOption ( [ 'scanners' , $ name ] , $ scanner ) ; }
Adds a new scanner class to use in the lexing process.

The scanner class needs to extend Phug\Lexer\ScannerInterface. It can be the class name itself
or an instance of it.

@param string                  $name
@param ScannerInterface|string $scanner

@return $this
Adds a new scanner class to use in the lexing process .