Database table object

This class handles a database table. Upon creation of the object, the table and database name (optional) are defined.

category Database
package Formaid
author Dieter Adriaenssens
copyright 2006-2013 Dieter Adriaenssens
license GPL
link http://formaid.sourceforge.net/

 Methods

Constructor, defines a database table

__construct(string $table, string $database) : void

Sets encoding to be used, and set name of the object

Parameters

$table

string

Table name

$database

string

Database name (optional, default : null)

Disables trimming whitespace of object name

disableTrimName() : void
Inherited
inherited_from \Formaid_Object::disableTrimName()

Display object

display() : void
Inherited

The name of the object is printed to stdout.

inherited_from \Formaid_Object::display()

Enables trimming whitespace of object name

enableTrimName() : void
Inherited
inherited_from \Formaid_Object::enableTrimName()

return Display string

getDisplayString() : string
Inherited
inherited_from \Formaid_Object::getDisplayString()

Returns

stringformatted object string

Returns name of the object

getName() : string
Inherited
inherited_from \Formaid_Object::getName()

Returns

stringobject name

Formats database and table pair

getSqlFormatName() : string

If the Database name is defined, it is concatenated with the Table name. Database and Table names are first escaped and backticks are added.

Returns

stringformatted `database`.`table` string

Checks if object name is empty

isNameEmpty() : bool
Inherited
inherited_from \Formaid_Object::isNameEmpty()

Returns

booltrue if empty

Sets new name for the object

setName(string $new_name) : void
Inherited
inherited_from \Formaid_Object::setName()

Parameters

$new_name

string

new name

Show object

show() : void
Inherited

The name of the object is printed to stdout.

inherited_from \Formaid_Object::show()

Returns name formatted for displaying

getDisplayName() : string
Inherited
inherited_from \Formaid_Object::getDisplayName()

Returns

stringformatted object name

 Properties

 

$database : object
access protected
 

$encoding : string
Inherited
access protected
inherited_from \Formaid_Object::$$encoding
 

$name : string
Inherited
access protected
inherited_from \Formaid_Object::$$name
 

$_dbConn 
access private
type object
 

$_trimName : bool
Inherited
access private
inherited_from \Formaid_Object::$$_trimName