source: pro-violet-viettel/sourcecode/api.violet.vn/www/plugins/sfPropel13Plugin/lib/vendor/propel/map/MapBuilder.php

Last change on this file was 289, checked in by dungnv, 11 years ago
File size: 3.0 KB
Line 
1<?php
2
3/*
4 *  $Id: MapBuilder.php 521 2007-01-05 13:29:36Z heltem $
5 *
6 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
7 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
8 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
9 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
10 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
12 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
13 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
14 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
15 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
16 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 *
18 * This software consists of voluntary contributions made by many individuals
19 * and is licensed under the LGPL. For more information please see
20 * <http://propel.phpdb.org>.
21 */
22
23/**
24 * MapBuilders are classes that construct a model of a database at runtime.
25 *
26 * MapBuilders support a single database, so this class essentially serves as
27 * a wrapper around the DatabaseMap class.  This interface can be used for any
28 * class that needs to construct a runtime database model; by default in Propel
29 * the MapBuilder.tpl generates a class for your datamodel that implements this
30 * interface and re-creates your database using the DatabaseMap, TableMap,
31 * ColumnMap, and ValidatorMap classes.
32 *
33 * GENERAL NOTE
34 * ------------
35 * The propel.map classes are abstract building-block classes for modeling
36 * the database at runtime.  These classes are similar (a lite version) to the
37 * propel.engine.database.model classes, which are build-time modeling classes.
38 * These classes in themselves do not do any database metadata lookups, but instead
39 * are used by the MapBuilder classes that were generated for your datamodel. The
40 * MapBuilder that was created for your datamodel build a representation of your
41 * database by creating instances of the DatabaseMap, TableMap, ColumnMap, etc.
42 * classes. See propel/templates/om/php5/MapBuilder.tpl and the classes generated
43 * by that template for your datamodel to further understand how these are put
44 * together.
45 *
46 * @author     Hans Lellelid <hans@xmpl.org> (Propel)
47 * @author     John D. McNally <jmcnally@collab.net> (Torque)
48 * @author     Hans Lellelid <hans@xmpl.org> (Torque)
49 * @version    $Revision: 521 $
50 * @package    propel.map
51 */
52interface MapBuilder {
53
54        /**
55         * Build up the database mapping.
56         * @return     void
57         * @throws     Exception Couldn't build mapping.
58         */
59        function doBuild();
60
61        /**
62         * Tells us if the database mapping is built so that we can avoid
63         * re-building it repeatedly.
64         *
65         * @return     boolean Whether the DatabaseMap is built.
66         */
67        function isBuilt();
68
69        /**
70         * Gets the database mapping this map builder built.
71         *
72         * @return     DatabaseMap A DatabaseMap.
73         */
74        function getDatabaseMap();
75}
Note: See TracBrowser for help on using the repository browser.