1 |
<?php
|
2 |
/*
|
3 |
* $Id: Database.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $
|
4 |
*
|
5 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
6 |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
7 |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
8 |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
9 |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
10 |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
11 |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
12 |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
13 |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
14 |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
15 |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
16 |
*
|
17 |
* This software consists of voluntary contributions made by many individuals
|
18 |
* and is licensed under the LGPL. For more information, see
|
19 |
* <http://www.phpdoctrine.com>.
|
20 |
*/
|
21 |
Doctrine::autoload('Doctrine_Schema_Object');
|
22 |
/**
|
23 |
* class Doctrine_Schema_Database
|
24 |
* Holds information on a database
|
25 |
*
|
26 |
* @package Doctrine
|
27 |
* @subpackage Schema
|
28 |
* @link www.phpdoctrine.com
|
29 |
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
30 |
* @since 1.0
|
31 |
* @version $Revision: 2702 $
|
32 |
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
|
33 |
* @author Jukka Hassinen <Jukka.Hassinen@BrainAlliance.com>
|
34 |
*/
|
35 |
class Doctrine_Schema_Database extends Doctrine_Schema_Object
|
36 |
{
|
37 |
|
38 |
protected $definition = array('name' => null,
|
39 |
'type' => null,
|
40 |
'charset' => null,
|
41 |
'description' => null,
|
42 |
'version' => null,
|
43 |
'engine' => null);
|
44 |
|
45 |
private $childs = array();
|
46 |
|
47 |
/**
|
48 |
*
|
49 |
* @return
|
50 |
* @access public
|
51 |
*/
|
52 |
public function __clone( )
|
53 |
{
|
54 |
|
55 |
}
|
56 |
/**
|
57 |
*
|
58 |
* @return
|
59 |
* @access public
|
60 |
*/
|
61 |
public function __toString( )
|
62 |
{
|
63 |
|
64 |
}
|
65 |
/**
|
66 |
*
|
67 |
* @return bool
|
68 |
* @access public
|
69 |
*/
|
70 |
public function isValid( )
|
71 |
{
|
72 |
|
73 |
}
|
74 |
/**
|
75 |
*
|
76 |
* @param Doctrine_Schema_Table table * @return Doctrine_Schema_Table
|
77 |
* @access public
|
78 |
*/
|
79 |
public function addTable( $table = null )
|
80 |
{
|
81 |
$this->childs[] = $table;
|
82 |
}
|
83 |
|
84 |
/**
|
85 |
*
|
86 |
* @return array of Doctrine_Schema_Table
|
87 |
*
|
88 |
*/
|
89 |
public function getTables()
|
90 |
{
|
91 |
return $this->childs;
|
92 |
}
|
93 |
}
|