3 declare(strict_types=1);
    47         $this->query_string = $a_query_string;
    56         $this->parsed_query = (string) preg_replace_callback(
    57             '/(owner:)\s?([A-Za-z0-9_\.\+\*\@!\$\%\~\-]+)/',
    58             array($this,
'replaceOwnerCallback'),
    68         $this->parsed_query = trim($this->query_string);
    69         if (stristr($this->parsed_query, 
'*')) {
    72         if (substr($this->parsed_query, -1) !== 
'"') {
    73             $this->parsed_query .= 
'*';
    87         if (isset($matches[2])) {
    89                 return $matches[1] . $usr_id;
   102         #ilLuceneQueryParser::checkAllowedCharacters($a_query);   103         #ilLuceneQueryParser::checkAsterisk($a_query);   104         #ilLuceneQueryParser::checkAmpersands($a_query);   107         #ilLuceneQueryParser::checkExclamationMark($a_query);   108         #ilLuceneQueryParser::checkQuestionMark($a_query);   110         #ilLuceneQueryParser::checkPlusMinus($a_query);   111         #ilLuceneQueryParser::checkANDORNOT($a_query);   113         #ilLuceneQueryParser::checkColon($a_query);   123         if (preg_match(
'/[^\pL0-9_+\-:.()\"*?&§€|!{}\[\]\^~\\@#\/$%\'= ]/u', $query) != 0) {
   135         if (preg_match(
'/^[\*]*$|[\s]\*|^\*[^\s]/', $query) != 0) {
   147         if (preg_match(
'/[&]{2}/', $query) > 0) {
   148             if (preg_match(
'/^([\pL0-9_+\-:.()\"*?&|!{}\[\]\^~\\@#\/$%\'=]+( && )?[\pL0-9_+\-:.()\"*?|!{}\[\]\^~\\@#\/$%\'=]+[ ]*)+$/u', $query) == 0) {
   161         if (preg_match(
'/[^\\\]\^([^\s]*[^0-9.]+)|[^\\\]\^$/', $query) != 0) {
   173         if (preg_match(
'/[^\\\]*~[^\s]*[^0-9\s]+/', $query, $matches) != 0) {
   185         if (preg_match(
'/^[^!]*$|^([\pL0-9_+\-:.()\"*?&|!{}\[\]\^~\\@#\/$%\'=]+( ! )?[\pL0-9_+\-:.()\"*?&|!{}\[\]\^~\\@#\/$%\'=]+[ ]*)+$/u', $query, $matches) == 0) {
   197         if (preg_match(
'/^(\?)|([^\pL0-9_+\-:.()\"*?&|!{}\[\]\^~\\@#\/$%\'=]\?+)/u', $query, $matches) != 0) {
   217         if (($matchLft = preg_match_all(
'/[(]/', $a_query, $tmp)) > 0) {
   220         if (($matchRgt = preg_match_all(
'/[)]/', $a_query, $tmp)) > 0) {
   224         if (!$hasLft || !$hasRgt) {
   229         if (($hasLft && !$hasRgt) || ($hasRgt && !$hasLft)) {
   233         if ($matchLft !== $matchRgt) {
   237         if (preg_match(
'/\(\s*\)/', $a_query) > 0) {
   250         if (preg_match(
'/^[^\n+\-]*$|^([+-]?\s*[\pL0-9_:.()\"*?&|!{}\[\]\^~\\@#\/$%\'=]+[ ]?)+$/u', $a_query) == 0) {
   263         if (preg_match(
'/^([\pL0-9_+\-:.()\"*?&|!{}\[\]\^~\\@\/#$%\'=]+\s*((AND )|(OR )|(AND NOT )|(NOT ))?[\pL0-9_+\-:.()\"*?&|!{}\[\]\^~\\@\/#$%\'=]+[ ]*)+$/u', $a_query) == 0) {
   276         $matches = preg_match_all(
'/"/', $a_query, $tmp);
   282         if (($matches % 2) > 0) {
   286         if (preg_match(
'/"\s*"/', $a_query) > 0) {
   299         if (preg_match(
'/[^\\\\s]:[\s]|[^\\\\s]:$|[\s][^\\]?:|^[^\\\\s]?:/', $a_query) != 0) {
 replaceOwnerCallback(array $matches)
Replace owner callback (preg_replace_callback) 
 
parse()
parse query string 
 
static checkPlusMinus(string $a_query)
Check plus minus. 
 
static checkQuotes(string $a_query)
Check quotes. 
 
parseAutoWildcard()
Append asterisk for remote search from global search form field. 
 
static checkColon(string $a_query)
Check colon. 
 
static checkSquiggle(string $query)
Check squiggles. 
 
static checkCaret(string $query)
Check carets. 
 
static checkAllowedCharacters(string $query)
Check allowed characters. 
 
static checkAsterisk(string $query)
Check asterisk. 
 
static checkParenthesis(string $a_query)
Check parenthesis. 
 
static _loginExists(string $a_login, int $a_user_id=0)
check if a login name already exists You may exclude a user from the check by giving his user id as 2...
 
static validateQuery($a_query)
 
static checkQuestionMark(string $query)
Check question mark (wild card single character) 
 
static checkAmpersands(string $query)
Check ampersands. 
 
static checkExclamationMark(string $query)
Check exclamation marks (replacement for NOT) 
 
static checkANDORNOT(string $a_query)
Check AND OR NOT. 
 
__construct($a_query_string)
Constructor.