MDB2_TableBrowser
[ class tree: MDB2_TableBrowser ] [ index: MDB2_TableBrowser ] [ all elements ]

Class: MDB2_TableBrowser_InterfaceWhereClauseGenerator

Source Location: /MDB2_TableBrowser-0.1.3/MDB2/TableBrowser/Interfaces.php

Class Overview

MDB2_TableBrowser_InterfaceSQLGenerator
   |
   --MDB2_TableBrowser_InterfaceWhereClauseGenerator

This interface defines a behaviour that includes generating all or part of the 'where' clause in an sql statement. The where clause is built using filters where each filter is a single expression.


Author(s):

Version:

  • Release: <package_version>

Copyright:

  • 2007-2012 Isaac Tewolde

Methods


Inherited Variables

Inherited Methods


Class Details

[line 51]
This interface defines a behaviour that includes generating all or part of the 'where' clause in an sql statement. The where clause is built using filters where each filter is a single expression.


[ Top ]


Method Detail

addCustomFilter   [line 95]

void addCustomFilter( string $filterName, string $sqlFrangment)

Adds a custom filter. A custom filter is an sql fragment that is added to the where clause of an sql statement. Like any other filter it must evaluate to true/false
  • Access: public

Parameters:

string   $filterName   —  The filter name
string   $sqlFrangment   —  The sql fragment

[ Top ]

addFilter   [line 70]

void addFilter( string $filterName, string $columnName, string $operator, mixed $value)

Adds a filter to the filter chain

A filter is an expression of the form columnName = "some value'. It can also be multivalued eg: (columnName = "value1" OR columnName="value2")

  • Access: public

Parameters:

string   $filterName   —  The filter name
string   $columnName   —  The column name
string   $operator   —  The operator eg: '=', '<>', etc.
mixed   $value   —  If string, then a single filter is being added eg: "animal = 'cat'" If array, then a multivalue filter is being added eg: "animal is one of 'cat','dog', or 'fish'"

[ Top ]

removeFilter   [line 84]

void removeFilter( string $filterName)

Removes a filter from the filter chain
  • Access: public

Parameters:

string   $filterName   —  The filter name

[ Top ]

resetFilters   [line 76]

void resetFilters( )

Clears the current filter chain
  • Access: public

[ Top ]

validateExpression   [line 108]

void validateExpression( string $columnName, string $operator, string $value)

Checks to see if the parameters will form a proper filter expression. It uses the tableValidator object to do this.
  • Throws: MDB2_TableBrowser_ParameterException if one of the parameters is invalid
  • Access: public

Parameters:

string   $columnName   —  The name of table column
string   $operator   —  The operator
string   $value   —  The value

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:48:26 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.