propel-map
[ class tree: propel-map ] [ index: propel-map ] [ all elements ]

Class: DatabaseMap

Source Location: /map/DatabaseMap.php

Class Overview


DatabaseMap is used to model a database.


Author(s):

Version:

  • $Revision: 521 $

Variables

Methods



Class Details

[line 43]
DatabaseMap is used to model a database.

GENERAL NOTE ------------ The propel.map classes are abstract building-block classes for modeling the database at runtime. These classes are similar (a lite version) to the propel.engine.database.model classes, which are build-time modeling classes. These classes in themselves do not do any database metadata lookups, but instead are used by the MapBuilder classes that were generated for your datamodel. The MapBuilder that was created for your datamodel build a representation of your database by creating instances of the DatabaseMap, TableMap, ColumnMap, etc. classes.




Tags:

author:  Hans Lellelid <hans@xmpl.org> (Propel)
author:  John D. McNally <jmcnally@collab.net> (Torque)
author:  Daniel Rall <dlr@collab.net> (Torque)
version:  $Revision: 521 $


[ Top ]


Class Variables

$tables = array()

[line 49]

Name of the tables in the database.



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 62]

DatabaseMap __construct( string $name)

Constructor.



Tags:

access:  public


Parameters:

string   $name   Name of the database.

[ Top ]

method addTable [line 137]

TableMap addTable( string $tableName)

Add a new table to the database by name.

This method creates an empty TableMap that must then be populated. This is called indirectly on-demand by the getTable() method, when there is a table builder (MapBuilder) registered, but no TableMap loaded.




Tags:

return:  The newly created TableMap.
access:  public


Parameters:

string   $tableName   The name of the table.

[ Top ]

method addTableBuilder [line 148]

void addTableBuilder( string $tableName, MapBuilder $builder)

Add a new table builder (MapBuilder) to the database by name.



Tags:

access:  public


Parameters:

string   $tableName   The name of the table.
MapBuilder   $builder  

[ Top ]

method containsTable [line 73]

boolean containsTable( string $name)

Does this database contain this specific table?



Tags:

return:  True if the database contains the table.
access:  public


Parameters:

string   $name   The String representation of the table.

[ Top ]

method getName [line 87]

string getName( )

Get the name of this database.



Tags:

return:  The name of the database.
access:  public


[ Top ]

method getTable [line 99]

TableMap getTable( string $name)

Get a TableMap for the table by name.



Tags:

return:  A TableMap
throws:  PropelException if the table is undefined
access:  public


Parameters:

string   $name   Name of the table.

[ Top ]

method getTables [line 115]

array getTables( )

Get a TableMap[] of all of the tables in the database.



Tags:

return:  A TableMap[].
access:  public


[ Top ]


Documentation generated on Thu, 22 Nov 2007 03:33:39 +0000 by phpDocumentor 1.4.0