PHP 클래스 yii\sphinx\MatchBuilder

또한 보기: MatchExpression
또한 보기: http://sphinxsearch.com/docs/current.html#extended-syntax
부터: 2.0.6
저자: Kirichenko Sergey ([email protected])
저자: Paul Klimov ([email protected])
상속: extends yii\base\Object
파일 보기 프로젝트 열기: yiisoft/yii2-sphinx

공개 프로퍼티들

프로퍼티 타입 설명
$db the Sphinx connection.

보호된 프로퍼티들

프로퍼티 타입 설명
$matchBuilders map of MATCH keywords to builder methods. These methods are used by [[buildMatch]] to build MATCH expression from array syntax.
$matchOperators map of MATCH operators. These operators are used for replacement of verbose operators.

공개 메소드들

메소드 설명
__construct ( Connection $connection, array $config = [] ) Constructor.
build ( MatchExpression $match ) : string Generates the MATCH expression from given MatchExpression object.
buildAndMatch ( string $operator, array $operands, array &$params ) : string Connects two or more MATCH expressions with the AND or OR operator
buildHashMatch ( array $match, array &$params ) : string Creates a MATCH based on column-value pairs.
buildIgnoreMatch ( string $operator, array $operands, &$params ) : string Create ignored MATCH expressions
buildMatch ( string | array $match, array &$params ) : string Create MATCH expression.
buildMultipleMatch ( string $operator, array $operands, &$params ) : string Create MAYBE, SENTENCE or PARAGRAPH expressions.
buildProximityMatch ( string $operator, array $operands, &$params ) : string Create PROXIMITY expressions
buildSimpleMatch ( string $operator, array $operands, array &$params ) : string Creates an Match expressions like "column" operator value.
buildZoneMatch ( string $operator, array $operands, &$params ) : string Create MATCH expressions for zones.

보호된 메소드들

메소드 설명
buildMatchColumn ( string $column, boolean $ignored = false ) : string Created column as string for expression of MATCH
buildMatchValue ( string | array | yii\db\Expression $value, array &$params ) : string Create placeholder for expression of MATCH
parseParams ( string $expression, array $params ) : string Returns the actual MATCH expression by inserting parameter values into the corresponding placeholders.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( Connection $connection, array $config = [] )
$connection Connection the Sphinx connection.
$config array name-value pairs that will be used to initialize the object properties

build() 공개 메소드

Generates the MATCH expression from given MatchExpression object.
public build ( MatchExpression $match ) : string
$match MatchExpression the [[MatchExpression]] object from which the MATCH expression will be generated.
리턴 string generated MATCH expression.

buildAndMatch() 공개 메소드

Connects two or more MATCH expressions with the AND or OR operator
public buildAndMatch ( string $operator, array $operands, array &$params ) : string
$operator string the operator which is used for connecting the given operands
$operands array the Match expressions to connect
$params array the expression parameters to be populated
리턴 string the MATCH expression

buildHashMatch() 공개 메소드

Creates a MATCH based on column-value pairs.
public buildHashMatch ( array $match, array &$params ) : string
$match array the match condition
$params array the expression parameters to be populated
리턴 string the MATCH expression

buildIgnoreMatch() 공개 메소드

Create ignored MATCH expressions
public buildIgnoreMatch ( string $operator, array $operands, &$params ) : string
$operator string the operator which is used for Create Match expressions
$operands array the Match expressions
리턴 string the MATCH expression

buildMatch() 공개 메소드

Create MATCH expression.
public buildMatch ( string | array $match, array &$params ) : string
$match string | array MATCH specification.
$params array the expression parameters to be populated
리턴 string the MATCH expression

buildMatchColumn() 보호된 메소드

Created column as string for expression of MATCH
protected buildMatchColumn ( string $column, boolean $ignored = false ) : string
$column string column specification.
$ignored boolean whether column should be specified as 'ignored'.
리턴 string the column statement.

buildMatchValue() 보호된 메소드

Create placeholder for expression of MATCH
protected buildMatchValue ( string | array | yii\db\Expression $value, array &$params ) : string
$value string | array | yii\db\Expression
$params array the expression parameters to be populated
리턴 string the MATCH expression

buildMultipleMatch() 공개 메소드

Create MAYBE, SENTENCE or PARAGRAPH expressions.
public buildMultipleMatch ( string $operator, array $operands, &$params ) : string
$operator string the operator which is used for Create Match expressions
$operands array the Match expressions
리턴 string the MATCH expression

buildProximityMatch() 공개 메소드

Create PROXIMITY expressions
public buildProximityMatch ( string $operator, array $operands, &$params ) : string
$operator string the operator which is used for Create Match expressions
$operands array the Match expressions
리턴 string the MATCH expression

buildSimpleMatch() 공개 메소드

Creates an Match expressions like "column" operator value.
public buildSimpleMatch ( string $operator, array $operands, array &$params ) : string
$operator string the operator to use. Anything could be used e.g. `>`, `<=`, etc.
$operands array contains two column names.
$params array the expression parameters to be populated
리턴 string the MATCH expression

buildZoneMatch() 공개 메소드

Create MATCH expressions for zones.
public buildZoneMatch ( string $operator, array $operands, &$params ) : string
$operator string the operator which is used for Create Match expressions
$operands array the Match expressions
리턴 string the MATCH expression

parseParams() 보호된 메소드

Returns the actual MATCH expression by inserting parameter values into the corresponding placeholders.
protected parseParams ( string $expression, array $params ) : string
$expression string the expression string which is needed to prepare.
$params array the binding parameters for inserting.
리턴 string parsed expression.

프로퍼티 상세

$db 공개적으로 프로퍼티

the Sphinx connection.
public $db

$matchBuilders 보호되어 있는 프로퍼티

map of MATCH keywords to builder methods. These methods are used by [[buildMatch]] to build MATCH expression from array syntax.
protected $matchBuilders

$matchOperators 보호되어 있는 프로퍼티

map of MATCH operators. These operators are used for replacement of verbose operators.
protected $matchOperators