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

Class: MDB2_TableBrowser_ColumnManager

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

Class Overview


This class implements the selectClauseGenerator interface


Author(s):

Version:

  • Release: <package_version>

Copyright:

  • 2007-2012 Isaac Tewolde

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 32]
This class implements the selectClauseGenerator interface

It is used by other classes to create and manage the select clause of an SQL statements. As such, it's primary purpose is to select columns and assign labels to them.



[ Top ]


Class Variables

$columns = array()

[line 38]

  • Access: protected

Type:   mixed


[ Top ]

$columnsAliases = array()

[line 42]

  • Access: protected

Type:   mixed


[ Top ]

$columnsAliasesReverseLookup = array()

[line 44]

  • Access: protected

Type:   mixed


[ Top ]

$customColumns = array()

[line 40]

  • Access: protected

Type:   mixed


[ Top ]

$validator =  null

[line 36]

  • Access: protected

Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 51]

MDB2_TableBrowser_ColumnManager __construct( MDB2_TableBrowser_InterfaceTableValidator &$validator)

Constructor
  • Access: public

Parameters:

tableValidator   &$validator   —  A refrence to an object that implements the tableValidator interface

[ Top ]

addCustomColumn   [line 176]

void addCustomColumn( string $colName, [string $alias = null])

Adds a custom column to the table_browser. Used for columns that are a function and not a tableColumn
  • Access: public

Parameters:

string   $colName   —  The column name (case sensitive)
string   $alias   —  An alias for the column(optional)

[ Top ]

generateSQL   [line 200]

string generateSQL( )

Generates the select clause of an sql statement
  • Return: the select clause
  • Access: public

[ Top ]

getColumnAlias   [line 140]

string getColumnAlias( string $colName)

Gets a column alias
  • Return: The column alias
  • Access: public

Parameters:

string   $colName   —  The column Name

[ Top ]

getRealColumnName   [line 157]

string getRealColumnName( string $alias)

Returns the actual column name given an alias. It will simply return the columnName if it is being passed the columnName instead of an alias.
  • Return: The real column name
  • Access: public

Parameters:

string   $alias   —  The column alias

[ Top ]

removeColumnAlias   [line 123]

void removeColumnAlias( string $colName)

Removes a column alias
  • Access: public

Parameters:

string   $colName   —  The column Name

[ Top ]

removeCustomColumn   [line 190]

void removeCustomColumn( string $colName)

Removes a custom column
  • Access: public

Parameters:

string   $colName   —  The column (case sensitive)

[ Top ]

resetColumAliases   [line 111]

void resetColumAliases( )

Removes all column aliases
  • Access: public

[ Top ]

resetSelectColumns   [line 81]

void resetSelectColumns( )

Resets the column selections
  • Access: public

[ Top ]

selectColumns   [line 64]

void selectColumns( array $colNames)

Selects the columns that will be included in the select clause
  • Throws: MDB2_TableBrowser_ParameterException if column is invalid
  • Access: public

Parameters:

array   $colNames   —  The columns to be included in the select clause

[ Top ]

setColumnAlias   [line 94]

void setColumnAlias( string $colName, string $alias)

Sets an alias for the sepecified column
  • Throws: MDB2_TableBrowser_ParameterException if column is invalid
  • Access: public

Parameters:

string   $colName   —  The column name
string   $alias   —  The column alias

[ Top ]


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