CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Parser\AST\NamespaceHeaderNode Class Reference

A "namespace header" in the query. More...

+ Inheritance diagram for CirrusSearch\Parser\AST\NamespaceHeaderNode:
+ Collaboration diagram for CirrusSearch\Parser\AST\NamespaceHeaderNode:

Public Member Functions

 __construct ( $startOffset, $endOffset, $namespace)
 
 toArray ()
 
 getNamespace ()
 
 accept (Visitor $visitor)
 
- Public Member Functions inherited from CirrusSearch\Parser\AST\ParsedNode
 __construct ( $startOffset, $endOffset)
 
 getStartOffset ()
 
 getEndOffset ()
 

Additional Inherited Members

- Protected Member Functions inherited from CirrusSearch\Parser\AST\ParsedNode
 baseParams ()
 

Detailed Description

A "namespace header" in the query.

Queries can be prefixed with a namespace header that allows to bypass namespaces selection made with API params or Special:Search UI. e.g.:

  • help:foobar

will search foobar in NS_HELP no matter what is selected previously.

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\Parser\AST\NamespaceHeaderNode::__construct ( $startOffset,
$endOffset,
$namespace )
Parameters
int$startOffset
int$endOffset
int | string$namespace"all" or a int.

Member Function Documentation

◆ accept()

CirrusSearch\Parser\AST\NamespaceHeaderNode::accept ( Visitor $visitor)
Parameters
Visitor$visitor

Implements CirrusSearch\Parser\AST\Visitor\Visitable.

◆ getNamespace()

CirrusSearch\Parser\AST\NamespaceHeaderNode::getNamespace ( )
Returns
int|string

◆ toArray()

CirrusSearch\Parser\AST\NamespaceHeaderNode::toArray ( )
Returns
array

Reimplemented from CirrusSearch\Parser\AST\ParsedNode.


The documentation for this class was generated from the following file: