phpDocumentor

SearchConditionStrategyControl
in package
implements SearchConditionStrategyControlInterface Uses SearchConditionStrategyTrait

Class SearchConditionStrategyControl

Interfaces, Classes and Traits

SearchConditionStrategyControlInterface
Interface SearchConditionStrategyControlInterface

Table of Contents

$settings  : SearchConditionSettingsInterface
__construct()  : mixed
SearchConditionStrategy constructor.
buildSql()  : string
Parses the given params and delegates to several strategies to build a sql statement, which will be returned.
create()  : self
Return a new object of this class.
settings()  : SearchConditionSettingsInterface
Returns the internal settings object.
getAttribute()  : string
Determines the sql attribute and returns it.
getValue()  : string
Determines the sql value and returns it.

Properties

Methods

buildSql()

Parses the given params and delegates to several strategies to build a sql statement, which will be returned.

public buildSql(array<string|int, mixed> $params) : string
Parameters
$params : array<string|int, mixed>
Tags
throws
InvalidSearchConditionException

If operation is unknown.

Return values
string

getAttribute()

Determines the sql attribute and returns it.

protected getAttribute(array<string|int, mixed> $params, array<string|int, mixed> $allowedColumns, array<string|int, mixed> $allowedTables) : string
Parameters
$params : array<string|int, mixed>
$allowedColumns : array<string|int, mixed>
$allowedTables : array<string|int, mixed>
Tags
throws
InvalidSearchConditionException

If given column or table is not allowed.

Return values
string

getValue()

Determines the sql value and returns it.

protected getValue(array<string|int, mixed> $params) : string

Notice: RangeStrategy and InStrategy have their own implementation.

Parameters
$params : array<string|int, mixed>
Return values
string

Search results