.

DBTableAlias Class Reference
[Model]

Alias for given DBTable. More...

Inheritance diagram for DBTableAlias:
IDBTable

List of all members.

Public Member Functions

  __construct (IDBTable $table, $alias)
  Constructor.
  get_matching_relations (IDBTable $other)
  Returns relations between two tables.
  get_table_alias ()
  Returns alias of table, if any.
  get_table_alias_escaped ()
  Returns alias of table, if any - but escaped.
  get_table_constraints ()
  Returns array of constraints.
  get_table_driver ()
  Returns DB driver fro this table.
  get_table_field ($column)
  Returns field fpr given column.
  get_table_fields ()
  Returns array of columns.
  get_table_keys ()
  Returns array of keys.
  get_table_name ()
  Returns name of table.
  get_table_name_escaped ()
  Returns name of table, but escaped.
  get_table_relations ()
  Returns array of relations.

Protected Attributes

  $alias
  $delegate

Detailed Description

Alias for given DBTable.

Author:
Gerd Riesselmann

Definition at line 8 of file dbtablealias.csl.php.


Constructor & Destructor Documentation

DBTableAlias::__construct ( IDBTable table,
alias  
)

Constructor.

Parameters:
IDBTable  $table The table to overload alias for
string  $alias

Definition at line 28 of file dbtablealias.csl.php.

00028                                                              {
00029                 $this->delegate = $table;
00030                 $this->alias = $alias;
00031         }

Member Function Documentation

DBTableAlias::get_matching_relations ( IDBTable other  ) 

Returns relations between two tables.

Parameters:
IDBTable  $other
Returns:
array Array of IDBRelations

Implements IDBTable.

Definition at line 112 of file dbtablealias.csl.php.

00112                                                                 {
00113                 return $this->delegate->get_matching_relations($other);
00114         }
DBTableAlias::get_table_alias (  ) 

Returns alias of table, if any.

Returns:
string

Implements IDBTable.

Definition at line 47 of file dbtablealias.csl.php.

00047                                           {
00048                 return $this->alias;
00049         }
DBTableAlias::get_table_alias_escaped (  ) 

Returns alias of table, if any - but escaped.

Returns:
string

Implements IDBTable.

Definition at line 65 of file dbtablealias.csl.php.

00065                                                   {
00066                 return $this->get_table_driver()->escape_database_entity($this->alias, IDBDriver::ALIAS);
00067         }       
DBTableAlias::get_table_constraints (  ) 

Returns array of constraints.

Returns:
array Array with IDBConstraint instance as value

Implements IDBTable.

Definition at line 121 of file dbtablealias.csl.php.

00121                                                 {
00122                 return $this->delegate->get_table_constraints();
00123         }
DBTableAlias::get_table_driver (  ) 

Returns DB driver fro this table.

Returns:
IDBDriver

Implements IDBTable.

Definition at line 130 of file dbtablealias.csl.php.

00130                                            {
00131                 return $this->delegate->get_table_driver();
00132         }               
DBTableAlias::get_table_field ( column  ) 

Returns field fpr given column.

Parameters:
string  $column Column name
Returns:
IDBField Either field or false if no such field exists

Implements IDBTable.

Definition at line 84 of file dbtablealias.csl.php.

00084                                                  {
00085                 return $this->delegate->get_table_field($column);
00086         }
DBTableAlias::get_table_fields (  ) 

Returns array of columns.

Returns:
array Associative array with column name as key and IDBField instance as value

Implements IDBTable.

Definition at line 74 of file dbtablealias.csl.php.

00074                                            {
00075                 return $this->delegate->get_table_fields();
00076         }
DBTableAlias::get_table_keys (  ) 

Returns array of keys.

Returns:
array Associative array with column name as key and IDField instance as value

Implements IDBTable.

Definition at line 93 of file dbtablealias.csl.php.

00093                                          {
00094                 return $this->delegate->get_table_keys();
00095         }
DBTableAlias::get_table_name (  ) 

Returns name of table.

Returns:
string

Implements IDBTable.

Definition at line 38 of file dbtablealias.csl.php.

00038                                          {
00039                 return $this->delegate->get_table_name();
00040         }
DBTableAlias::get_table_name_escaped (  ) 

Returns name of table, but escaped.

Returns:
string

Implements IDBTable.

Definition at line 56 of file dbtablealias.csl.php.

00056                                                  {
00057                 return $this->delegate->get_table_name_escaped();
00058         }
DBTableAlias::get_table_relations (  ) 

Returns array of relations.

Returns:
array Array with IDBRelation instance as value

Implements IDBTable.

Definition at line 102 of file dbtablealias.csl.php.

00102                                               {
00103                 return $this->delegate->get_table_relations();
00104         }

Member Data Documentation

DBTableAlias::$alias [protected]

Definition at line 20 of file dbtablealias.csl.php.

DBTableAlias::$delegate [protected]

Definition at line 14 of file dbtablealias.csl.php.


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