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

Class: MDB2_TableBrowser_TableValidator

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

Class Overview


This class implements the TableValidator 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 TableValidator interface

This class provides methods that provide information about a table structure and columns. It is used by other classes to insure paramaters passed on by the user make sense in light of a table's definition



[ Top ]


Class Variables

$caseSensitiveIdentifiers =  false

[line 43]

  • Access: protected

Type:   mixed


[ Top ]

$mdb2Object =  null

[line 40]

  • Access: protected

Type:   mixed


[ Top ]

$tableName =  null

[line 38]

  • Access: protected

Type:   mixed


[ Top ]

$tableRegistry = array()

[line 35]

  • Access: protected

Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 53]

MDB2_TableBrowser_TableValidator __construct( MDB2_Driver_Common &$mdbref, string $tableName, [boolean $caseSensitive = false])

Constructor
  • Access: public

Parameters:

MDB2_Driver_Common   &$mdbref   —  Refrence to an MDB2 connection
string   $tableName   —  The table name
boolean   $caseSensitive   —  flag to make the library case sensitive

[ Top ]

formatIdentifier   [line 68]

string formatIdentifier( string $name)

formats the columnName to be in a format used internally. Column names are by default stored in a cases insensitive manner.
  • Return: The formated name
  • Access: public

Parameters:

string   $name   —  The identifier

[ Top ]

getColumns   [line 119]

array getColumns( )

Returns all the columns of the table, in the order that they are defined in the table
  • Return: the column names
  • Access: public

[ Top ]

getInsertSQL   [line 128]

string getInsertSQL( )

Gets a properly formated Insert sql statment for the table.
  • Access: public

[ Top ]

isValidColumn   [line 139]

boolean isValidColumn( string $columnName)

Checks to see if a column exists in the table definition
  • Access: public

Parameters:

string   $columnName   —  The column name

[ Top ]

isValidData   [line 174]

boolean isValidData( string $colName, string $columnValue)

Checks to see if a given column value is valid given the table definition
  • Access: public

Parameters:

string   $colName   —  The column name
string   $columnValue   —  The column value

[ Top ]

isValidOperator   [line 186]

boolean isValidOperator( string $op)

Checks to see if an operator is valid
  • Access: public

Parameters:

string   $op   —  The operator eg: '=', '>='

[ Top ]

isValidRow   [line 157]

unknown isValidRow( array $rowData)

Checks to see if a row is valid given the table definition
  • Access: public

Parameters:

array   $rowData   —  The row data

[ Top ]

loadTableDefinition   [line 78]

array loadTableDefinition( )

Loads a table definition and stores it in the class variable self::$tableRegistry
  • Return: structure containing the table definition
  • Throws: MDB2_TableBrowser_DBException if the table is invalid or inaccessable
  • Access: protected

[ Top ]

quote   [line 209]

string quote( string $data)

Escapes/Quotes a column value (uses mdb2's quote)
  • Access: public

Parameters:

string   $data   —  The column value

[ Top ]

quoteIdentifier   [line 198]

string quoteIdentifier( string $columnName)

Escapes/Quotes a column name (uses mdb2's quoteIdentifier)
  • Access: public

Parameters:

string   $columnName   —  The column name

[ Top ]


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