Class CMS_forms_sendingsSearch

Description

Class CMS_forms_sendingsSearch

This class performs searches of form records and returns resultsets, number of records founded, paginate, etc.

Located in /automne/classes/modules/cms_forms/sendingssearch.php (line 28)

CMS_grandFather
   |
   --CMS_forms_sendingsSearch
Method Summary
 CMS_forms_sendingsSearch __construct ([string $where = false], [string $orderBy = false], [integer $page = false], [integer $itemsPerPage = false], boolean $public)
 void addWhereCondition ( $type, string $value, string $key)
 string getAttribute (string $name)
 integer getMaxPages ()
 integer getNumRows ()
 array(CMS_resources_cms_news) search ()
 void setAttribute (string $name, $value $value)
 string _buildSQL ()
 string _getResultsCount ()
 string _sanitizeSQLString ( $s, string $s,)
Methods
Constructor __construct (line 104)

Constructor

  • access: public
CMS_forms_sendingsSearch __construct ([string $where = false], [string $orderBy = false], [integer $page = false], [integer $itemsPerPage = false], boolean $public)
  • string $where
  • string $orderBy
  • integer $page
  • integer $itemsPerPage
  • boolean $public
addWhereCondition (line 154)

Builds where statement with a key and its value

The key can be known, this class will create statements in consequence or not known so key is understood as a field name and this method will append a statement such $key='$value'

  • access: public
void addWhereCondition ( $type, string $value, string $key)
  • string $key: name of statement to set
  • string $value: , the value to give
  • $type
getAttribute (line 126)

Getter for any private attribute on this class

  • access: public
string getAttribute (string $name)
  • string $name
getMaxPages (line 251)

Count and returns how many of pages in resultset with current itemsPerpage value

  • access: public
integer getMaxPages ()
getNumRows (line 237)

Count items founded with query COUNT(*)

  • access: public
integer getNumRows ()
search (line 266)

Proceed to serach and returns the array of results, null if none founded. All search options had been set yet.

  • access: public
array(CMS_resources_cms_news) search ()
setAttribute (line 138)

Setter for any private attribute on this class

  • access: public
void setAttribute (string $name, $value $value)
  • string $name: name of attribute to set
  • $value $value: , the value to give
_buildSQL (line 182)

Prepares and stores SQL query from given attributes

  • access: private
string _buildSQL ()
_getResultsCount (line 208)

Count how many results can be returned by query

  • access: private
string _getResultsCount ()
_sanitizeSQLString (line 225)

Cleans a value submited by user before givening it to SQL.

  • access: private
string _sanitizeSQLString ( $s, string $s,)
  • string $s,: the string to clean
  • $s

Inherited Methods

Inherited From CMS_grandFather

 CMS_grandFather::autoload()
 CMS_grandFather::hasError()
 CMS_grandFather::log()
 CMS_grandFather::PHPErrorHandler()
 CMS_grandFather::raiseError()
 CMS_grandFather::setDebug()
 CMS_grandFather::setLog()
 CMS_grandFather::_raiseError()
 CMS_grandFather::__call()
Class Constants

Documentation generated on Wed, 15 Feb 2012 15:38:57 +0100 by phpDocumentor 1.4.3