SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class SearchHandler

Defines a table which can be searched against using the front-end search

Variables

NameVisibilityDescription
$ctlr_name 
$having 
$joins 
$table 
$where 

Functions

NameVisibilityDescription
__constructpublic 
addHavingpublicAdds a having clause to this search handler.
addJoinpublicAdds a join to this search handler.
addWherepublicAdds a where clause to this search handler.
getCtlrNamepublicGets the controller name, e.g. PageController
getHavingpublicGets all having clauses which should be added to the search query
getJoinspublicGets all joins which should be added to the search query
getMainTablepublicGets the table name for the main table, e.g. pages
getTablepublicGets the table name for the keywords table, e.g. page_keywords
getWherepublicGets all where clauses which should be added to the search query
setCtlrNamepublicSets the controller name, e.g. PageController. The specified controller must implement the FrontEndSearch interface.
setTablepublicSets the table name for the keywords table, e.g. page_keywords

public __construct

void $SearchHandler->__construct ( string $table , string $ctlr_name );

This function does not have a description

public addHaving

void $SearchHandler->addHaving ( mixed $val );

Adds a having clause to this search handler.
Having clauses should refer to the main table using the alias 'main'
e.g. $handler->addHaving("main.active = 1")

public addJoin

void $SearchHandler->addJoin ( mixed $val );

Adds a join to this search handler.
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")

public addWhere

void $SearchHandler->addWhere ( mixed $val );

Adds a where clause to this search handler.
Where clauses should refer to the main table using the alias 'main'
e.g. $handler->addWhere("main.active = 1")

public getCtlrName

unknown $SearchHandler->getCtlrName ( );

Gets the controller name, e.g. PageController

public getHaving

unknown $SearchHandler->getHaving ( );

Gets all having clauses which should be added to the search query

public getJoins

unknown $SearchHandler->getJoins ( );

Gets all joins which should be added to the search query

public getMainTable

unknown $SearchHandler->getMainTable ( );

Gets the table name for the main table, e.g. pages

public getTable

unknown $SearchHandler->getTable ( );

Gets the table name for the keywords table, e.g. page_keywords

public getWhere

unknown $SearchHandler->getWhere ( );

Gets all where clauses which should be added to the search query

public setCtlrName

void $SearchHandler->setCtlrName ( mixed $val );

Sets the controller name, e.g. PageController. The specified controller must implement the FrontEndSearch interface.

public setTable

void $SearchHandler->setTable ( mixed $val );

Sets the table name for the keywords table, e.g. page_keywords