.

DBFilterColumn Class Reference
[Model]

A filter to apply to a search result. More...

Inheritance diagram for DBFilterColumn:
DBFilter IDBQueryModifier

List of all members.

Public Member Functions

  __construct ($column, $value, $title, $operator= '=')
  contructor
  apply ($query)
  Do what should be done.
  get_column ()
  get_value ()

Detailed Description

A filter to apply to a search result.

Author:
Gerd Riesselmann

Definition at line 32 of file dbfiltercolumn.cls.php.


Constructor & Destructor Documentation

DBFilterColumn::__construct ( column,
value,
title,
operator = '='  
)

contructor

Parameters:
string  column
string  title
enum  type of column

Definition at line 55 of file dbfiltercolumn.cls.php.

00055                                                                               {
00056                 $this->column = $column;
00057                 $this->value = $value;
00058                 $this->operator = $operator;
00059                 
00060                 parent::__construct($title);    
00061         }

Member Function Documentation

DBFilterColumn::apply ( query  ) 

Do what should be done.

Parameters:
DataObjectBase  The current query to be modified

Reimplemented from DBFilter.

Definition at line 71 of file dbfiltercolumn.cls.php.

00071                                       {
00072                 $column = trim($this->column);
00073                 if (empty($column)) {
00074                         return;
00075                 }
00076                 
00077                 $value = $this->preprocess_value($this->value, $this->operator);
00078                 $query->add_where($column, $this->operator, $value);
00079         }
DBFilterColumn::get_column (  ) 

Definition at line 63 of file dbfiltercolumn.cls.php.

00063                                      {
00064                 return $this->column;
00065         }
DBFilterColumn::get_value (  ) 

Definition at line 67 of file dbfiltercolumn.cls.php.

00067                                     {
00068                 return $this->value;
00069         }

The documentation for this class was generated from the following file: