Parses a global search string, of syntax similar to: h:linux or windows and s:ping. More...
Public Member Functions | |
__construct ($objects) | |
Create an expression parser, given a set of prefixes/object types available to search for. | |
getLastString () | |
Return the type of last string/name specified in the query. | |
getLastObject () | |
Return the type of last object specified in the query. | |
Protected Member Functions | |
run () | |
Entrypoint to start the parsing. | |
criteria () | |
Parse a criteria (table:string or string or string). | |
acceptUnquotedUntil ($keywordlist=false) | |
Get everything to a given token. | |
expectUnquotedUntil ($keywordlist=false) | |
Expect that there is anything left in the buffer, and get everything up until next keyword. | |
Protected Attributes | |
$objects = array() | |
List of table shortcuts for searching. | |
$last_object = false | |
Last object found in the search string. | |
$last_string = false | |
Last string in the search query, for auto-complete. |
Parses a global search string, of syntax similar to: h:linux or windows and s:ping.
ExpParser_SearchFilter::__construct | ( | $ | objects | ) |
Create an expression parser, given a set of prefixes/object types available to search for.
Use the format as array( shortcut => object type )
$objects | array of object types |
ExpParser_SearchFilter::getLastObject | ( | ) |
Return the type of last object specified in the query.
Useful for autocomplete
ExpParser_SearchFilter::getLastString | ( | ) |
Return the type of last string/name specified in the query.
Useful for autocomplete