SproutCMS

This is the code documentation for the SproutCMS project

class SearchHandler

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

Extending this class

<?php
/**
* New class description goes here
* 
* @author Your Name, 2024-05-02
**/
class NewClassName extends SearchHandler {
    
    /**
    * Gets all having clauses which should be added to the search query
    **/
    public function getHaving () {
        // Method code goes here
    }
    
    public function __construct (string $table, string $ctlr_name) {
        // Method code goes here
    }
    
    /**
    * Gets the table name for the keywords table, e.g. page_keywords
    **/
    public function getTable () {
        // Method code goes here
    }
    
    /**
    * Gets the table name for the main table, e.g. pages
    **/
    public function getMainTable () {
        // Method code goes here
    }
    
    /**
    * Sets the table name for the keywords table, e.g. page_keywords
    **/
    public function setTable ($val) {
        // Method code goes here
    }
    
    /**
    * Gets the controller name, e.g. PageController
    **/
    public function getCtlrName () {
        // Method code goes here
    }
    
    /**
    * Sets the controller name, e.g. PageController. The specified controller must implement the FrontEndSearch interface.
    **/
    public function setCtlrName ($val) {
        // Method code goes here
    }
    
    /**
    * Gets all where clauses which should be added to the search query
    **/
    public function getWhere () {
        // Method code goes here
    }
    
    /**
    * Adds a where clause to this search handler.
    * Where clauses should refer to the main table using the alias 'main'
    * e.g. $handler-&gt;addWhere(&quot;main.active = 1&quot;)
    **/
    public function addWhere ($val) {
        // Method code goes here
    }
    
    /**
    * Adds a having clause to this search handler.
    * Having clauses should refer to the main table using the alias 'main'
    * e.g. $handler-&gt;addHaving(&quot;main.active = 1&quot;)
    **/
    public function addHaving ($val) {
        // Method code goes here
    }
    
    /**
    * Gets all joins which should be added to the search query
    **/
    public function getJoins () {
        // Method code goes here
    }
    
    /**
    * Adds a join to this search handler.
    * Inner joins should refer to the main table using the alias 'main'
    * e.g. $handler-&gt;addJoin(&quot;INNER JOIN categories ON categories.item_id = main.id&quot;)
    **/
    public function addJoin ($val) {
        // Method code goes here
    }
    
}
?>