\SearchToken

Represents a token within a search criteria.

Summary

Methods
Properties
Constants
__construct()
where()
isOperator()
operatorName()
operatorArguments()
name()
value()
negated()
__toString()
No public properties found
No constants found
No protected methods found
$_data
N/A
No private methods found
No private properties found
N/A

Properties

$_data

$_data : array

Token information.

Type

array

Methods

__construct()

__construct(string $token,  $where)

Constructor.

Parameters

string $token

The string representing this token

$where

where()

where() : string

Indicates the type of "where()" ORM method that should be used to scope when using this token: "andWhere()", "orWhere" or just "where()".

  • or: Indicates that Query::orWhere() should be used
  • and: Indicates that Query::andWhere() should be used
  • NULL: Indicates that Query::where() should be used

Returns

string —

Possible values are: or, and & null

isOperator()

isOperator() : boolean

Indicates if this token represents an operator.

Returns

boolean —

True if it's an operator

operatorName()

operatorName() : string

Gets operator's name.

Should be used only when this token is an operator.

Returns

string

operatorArguments()

operatorArguments() : string

Gets operator's argument.

Should be used only when this token is an operator.

Returns

string

name()

name() : string

Gets operator's name (if this token is an operator), or string representation of this token (if ain't operator).

Returns

string

value()

value() : string

Gets operator's value (if this token is an operator), or string representation of this token (if ain't operator).

Returns

string

negated()

negated() : boolean

Indicates this token was negated using "-" symbol. e.g. `-"no this phrase"`

Returns

boolean —

True if it's negated

__toString()

__toString() : string

Magic method.

Returns

string