SearchHandler
in package
Defines a table which can be searched against using the front-end search
Table of Contents
Properties
- $ctlr_name : mixed
- $having : mixed
- $joins : mixed
- $table : mixed
- $where : mixed
Methods
- __construct() : mixed
- addHaving() : mixed
- Adds a having clause to this search handler.
- addJoin() : mixed
- Adds a join to this search handler.
- addWhere() : mixed
- Adds a where clause to this search handler.
- getCtlrName() : mixed
- Gets the controller name, e.g. PageController
- getHaving() : mixed
- Gets all having clauses which should be added to the search query
- getJoins() : mixed
- Gets all joins which should be added to the search query
- getMainTable() : mixed
- Gets the table name for the main table, e.g. pages
- getTable() : mixed
- Gets the table name for the keywords table, e.g. page_keywords
- getWhere() : mixed
- Gets all where clauses which should be added to the search query
- setCtlrName() : mixed
- Sets the controller name, e.g. PageController. The specified controller must implement the FrontEndSearch interface.
- setTable() : mixed
- Sets the table name for the keywords table, e.g. page_keywords
Properties
$ctlr_name
private
mixed
$ctlr_name
$having
private
mixed
$having
$joins
private
mixed
$joins
$table
private
mixed
$table
$where
private
mixed
$where
Methods
__construct()
public
__construct(string $table, string $ctlr_name) : mixed
Parameters
- $table : string
-
The name of the keywords table, e.g. page_keywords
- $ctlr_name : string
-
The name of a controller which implements the FrontEndSearch interface. Must be fully namespaced.
addHaving()
Adds a having clause to this search handler.
public
addHaving(mixed $val) : mixed
Having clauses should refer to the main table using the alias 'main' e.g. $handler->addHaving("main.active = 1")
Parameters
- $val : mixed
addJoin()
Adds a join to this search handler.
public
addJoin(mixed $val) : mixed
Inner joins should refer to the main table using the alias 'main' e.g. $handler->addJoin("INNER JOIN categories ON categories.item_id = main.id")
Parameters
- $val : mixed
addWhere()
Adds a where clause to this search handler.
public
addWhere(mixed $val) : mixed
Where clauses should refer to the main table using the alias 'main' e.g. $handler->addWhere("main.active = 1")
Parameters
- $val : mixed
getCtlrName()
Gets the controller name, e.g. PageController
public
getCtlrName() : mixed
getHaving()
Gets all having clauses which should be added to the search query
public
getHaving() : mixed
getJoins()
Gets all joins which should be added to the search query
public
getJoins() : mixed
getMainTable()
Gets the table name for the main table, e.g. pages
public
getMainTable() : mixed
getTable()
Gets the table name for the keywords table, e.g. page_keywords
public
getTable() : mixed
getWhere()
Gets all where clauses which should be added to the search query
public
getWhere() : mixed
setCtlrName()
Sets the controller name, e.g. PageController. The specified controller must implement the FrontEndSearch interface.
public
setCtlrName(mixed $val) : mixed
Parameters
- $val : mixed
setTable()
Sets the table name for the keywords table, e.g. page_keywords
public
setTable(mixed $val) : mixed
Parameters
- $val : mixed