[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/ -> searchlib.php (summary)

(no description)

Copyright: 1999 onwards Martin Dougiamas {@link http://moodle.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 479 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 3 classes

search_token:: (5 methods):
  __construct()
  search_token()
  sanitize()
  getValue()
  getType()

search_lexer:: (2 methods):
  __construct()
  search_lexer()

search_parser:: (14 methods):
  get_parsed_array()
  accept()
  indatefrom()
  indateto()
  ininstance()
  inuserid()
  inusername()
  inmeta()
  inrequired()
  inexcluded()
  inquotedstring()
  plainstring()
  search_generate_text_SQL()
  search_generate_SQL()


Class: search_token  - X-Ref

Class to hold token/value pairs after they're parsed.

__construct($type,$value)   X-Ref
No description

search_token($type, $value)   X-Ref
Old syntax of class constructor. Deprecated in PHP7.


sanitize($userstring)   X-Ref
No description

getValue()   X-Ref
No description

getType()   X-Ref
No description

Class: search_lexer  - X-Ref

This class does the heavy lifting of lexing the search string into tokens.
Using a full-blown lexer is probably overkill for this application, but
might be useful for other tasks.

__construct(&$parser)   X-Ref
No description

search_lexer(&$parser)   X-Ref
Old syntax of class constructor. Deprecated in PHP7.


Class: search_parser  - X-Ref

This class takes care of sticking the proper token type/value pairs into
the parsed token  array.
Most functions in this class should only be called by the lexer, the
one exception being getParseArray() which returns the result.

get_parsed_array()   X-Ref
No description

accept()   X-Ref
No description

indatefrom($content)   X-Ref
No description

indateto($content)   X-Ref
No description

ininstance($content)   X-Ref
No description

inuserid($content)   X-Ref
No description

inusername($content)   X-Ref
No description

inmeta($content)   X-Ref
No description

inrequired($content)   X-Ref
No description

inexcluded($content)   X-Ref
No description

inquotedstring($content)   X-Ref
No description

plainstring($content)   X-Ref
No description

search_generate_text_SQL($parsetree, $datafield, $metafield, $mainidfield, $useridfield,$userfirstnamefield, $userlastnamefield, $timefield, $instancefield)   X-Ref
Primitive function to generate a SQL string from a parse tree
using TEXT indexes. If searches aren't suitable to use TEXT
this function calls the default search_generate_SQL() one.


search_generate_SQL($parsetree, $datafield, $metafield, $mainidfield, $useridfield,$userfirstnamefield, $userlastnamefield, $timefield, $instancefield)   X-Ref
Primitive function to generate a SQL string from a parse tree.
Parameters:

$parsetree should be a parse tree generated by a
search_lexer/search_parser combination.
Other fields are database table names to search.




Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1