PHP 클래스 Horde_Db_SearchParser, horde

Copyright 2004-2016 Horde LLC (http://www.horde.org/) The expression recognizes boolean "AND", "OR", and "NOT" (providing no operator between keywords implies "AND"), like so: cat and dog cat or dog cat and not dog If no operator appears between keywords or quoted strings, "AND" is assumed. A comma can be used instead of "OR": cat dog cat, dog cat not dog The parser recognizes parentheses, so complex expressions can be created: cat and not (dog or puppy) Quoted strings are also recognized, and are taken as literal keywords: "cat and dog" Parsing is designed to be as fuzzy as possible, so it shouldn't error unless people search for "AND", "OR", or "NOT" without quoting it or use unbalanced parentheses.
저자: Jason M. Felice ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 메소드들

메소드 설명
parse ( string $column, string $expr ) : string Parses a keyword expression.

보호된 메소드들

메소드 설명
_parseKeywords1 ( $column, &$tokens )
_parseKeywords2 ( $column, &$tokens )
_parseKeywords3 ( $column, &$tokens )
_parseKeywords4 ( $column, &$tokens )

메소드 상세

_parseKeywords1() 보호된 정적인 메소드

protected static _parseKeywords1 ( $column, &$tokens )

_parseKeywords2() 보호된 정적인 메소드

protected static _parseKeywords2 ( $column, &$tokens )

_parseKeywords3() 보호된 정적인 메소드

protected static _parseKeywords3 ( $column, &$tokens )

_parseKeywords4() 보호된 정적인 메소드

protected static _parseKeywords4 ( $column, &$tokens )

parse() 공개 정적인 메소드

Parses a keyword expression.
public static parse ( string $column, string $expr ) : string
$column string This is the SQL field name the resulting expression should test against.
$expr string This is the keyword expression we want to parse.
리턴 string The query expression.