com.lokorin.lokorin.lib
[ class tree: com.lokorin.lokorin.lib ] [ index: com.lokorin.lokorin.lib ] [ all elements ]

Class: LikeSearch

Source Location: /_includes/lib_search.php

Class Overview

SearchField
   |
   --LikeSearch

Describes a search field that implements LIKE searches.


Author(s):

  • Andreas Launila

Methods


Inherited Variables

Inherited Methods

Class: SearchField

SearchField::__construct()
Constructor for SearchField.
SearchField::getRequestName()
Gets the name of the table field that the search field is connected to.
SearchField::getSqlWhereCondition()
Gets the where condition of the search field. This should be a sql statement that can be placed after "WHERE" in the sql query. A couple of examples: "id > 5", "(solved = 1) AND (tested = 0)".
SearchField::isValid()
Checks if the search field is valid, meaning if it has has caugth a non empty parameter.
SearchField::setParameter()
Sets the parameter for the search done by the field to a new value.

Class Details

[line 390]
Describes a search field that implements LIKE searches.



Tags:

author:  Andreas Launila


[ Top ]


Class Methods


constructor __construct [line 401]

LikeSearch __construct( mixed $requestName, mixed $tableField, [string $processCallback = 'convertWildcardToLike'])

Constructor for LikeSearch.



Tags:

access:  public
see:  SearchField.searchField($requestName, SearchField::$tableField, $processCallback = '')


Overrides SearchField::__construct() (Constructor for SearchField.)

Parameters:

string   $processCallback   An optional callback that will be used by the search field to process parameters before they are used in the sql query. The callback should take one value which is the value of the parameter from $_REQUEST and return one value, which is the desired value to use. The default is that wilcards (*) are converted to LIKE wildcards.

[ Top ]

method getSqlWhereCondition [line 410]

void getSqlWhereCondition( )



Tags:

access:  public
see:  SearchField.getSqlWhereCondition()


Overrides SearchField::getSqlWhereCondition() (Gets the where condition of the search field. This should be a sql statement that can be placed after "WHERE" in the sql query. A couple of examples: "id > 5", "(solved = 1) AND (tested = 0)".)

[ Top ]


Documentation generated on Sun, 16 Apr 2006 21:03:55 +0200 by phpDocumentor 1.3.0RC4