diff --git a/tests/coverage/Doctrine_EventListener_Exception.html b/tests/coverage/Doctrine_EventListener_Exception.html deleted file mode 100644 index 81ad1f1f8..000000000 --- a/tests/coverage/Doctrine_EventListener_Exception.html +++ /dev/null @@ -1,113 +0,0 @@ - - - Coverage for Doctrine_EventListener_Exception - - -

Coverage for Doctrine_EventListener_Exception

Back to coverage report

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1<?php -
2/* -
3 *  $Id: Exception.php 1344 2007-05-12 23:27:16Z zYne $ -
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 -
22/** -
23 * Doctrine_EventListener_Exception -
24 * -
25 * @package     Doctrine -
26 * @subpackage  EventListener -
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL -
28 * @link        www.phpdoctrine.com -
29 * @since       1.0 -
30 * @version     $Revision: 1344 $ -
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> -
32 */ -
33class Doctrine_EventListener_Exception extends Doctrine_Exception -
34{ }
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Migration_Exception.html b/tests/coverage/Doctrine_Migration_Exception.html deleted file mode 100644 index 449f3031d..000000000 --- a/tests/coverage/Doctrine_Migration_Exception.html +++ /dev/null @@ -1,113 +0,0 @@ - - - Coverage for Doctrine_Migration_Exception - - -

Coverage for Doctrine_Migration_Exception

Back to coverage report

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1<?php -
2/* -
3 *  $Id: Exception.php 1080 2007-02-10 18:17:08Z jwage $ -
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/** -
22 * Doctrine_Migration_Exception -
23 * -
24 * @package     Doctrine -
25 * @subpackage  Migration -
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL -
27 * @link        www.phpdoctrine.com -
28 * @since       1.0 -
29 * @version     $Revision: 1080 $ -
30 * @author      Jonathan H. Wage <jwage@mac.com> -
31 */ -
32class Doctrine_Migration_Exception extends Doctrine_Exception -
33{ -
34}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Migration_Process.html b/tests/coverage/Doctrine_Migration_Process.html new file mode 100755 index 000000000..86cc39efc --- /dev/null +++ b/tests/coverage/Doctrine_Migration_Process.html @@ -0,0 +1,749 @@ + + + Coverage for Doctrine_Migration_Process + + +

Coverage for Doctrine_Migration_Process

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Process.php 1080 2007-02-10 18:17:08Z jwage $ +
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 +
22/** +
23 * Doctrine_Migration_Process +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Migration +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 1080 $ +
31 * @author      Jonathan H. Wage <jwage@mac.com> +
32 */ +
33class Doctrine_Migration_Process +
34{ +
35    /** +
36     * getConnection +
37     * +
38     * @param string $tableName  +
39     * @return void +
40     */ +
41    public function getConnection($tableName) +
42    { +
43        return Doctrine::getConnectionByTableName($tableName); +
44    } +
45 +
46    /** +
47     * processCreatedTables +
48     * +
49     * @param string $tables  +
50     * @return void +
51     */ +
52    public function processCreatedTables($tables) +
53    { +
54        foreach ($tables as $table) { +
55            $conn = $this->getConnection($table['tableName']); +
56             +
57            $conn->export->createTable($table['tableName'], $table['fields'], $table['options']); +
58        } +
59    } +
60 +
61    /** +
62     * processDroppedTables +
63     * +
64     * @param string $tables  +
65     * @return void +
66     */ +
67    public function processDroppedTables($tables) +
68    { +
69        foreach ($tables as $table) { +
70            $conn = $this->getConnection($table['tableName']); +
71             +
72            $conn->export->dropTable($table['tableName']); +
73        } +
74    } +
75 +
76    /** +
77     * processRenamedTables +
78     * +
79     * @param string $tables  +
80     * @return void +
81     */ +
82    public function processRenamedTables($tables) +
83    { +
84        foreach ($tables as $table) { +
85            $conn = $this->getConnection($table['newTableName']); +
86             +
87            $conn->export->alterTable($table['oldTableName'], array('name' => $table['newTableName'])); +
88        } +
89    } +
90 +
91    /** +
92     * processAddedColumns +
93     * +
94     * @param string $columns  +
95     * @return void +
96     */ +
97    public function processAddedColumns($columns) +
98    { +
99        foreach ($columns as $column) { +
100            $conn = $this->getConnection($column['tableName']); +
101             +
102            $options = array(); +
103            $options = $column['options']; +
104            $options['type'] = $column['type']; +
105             +
106            $conn->export->alterTable($column['tableName'], array('add' => array($column['columnName'] => $options))); +
107        } +
108    } +
109 +
110    /** +
111     * processRenamedColumns +
112     * +
113     * @param string $columns  +
114     * @return void +
115     */ +
116    public function processRenamedColumns($columns) +
117    { +
118        foreach ($columns as $column) { +
119            $conn = $this->getConnection($column['tableName']); +
120             +
121            $conn->export->alterTable($column['tableName'], array('rename' => array($column['oldColumnName'] => array('name' => $column['newColumnName'])))); +
122        } +
123    } +
124 +
125    /** +
126     * processChangedColumns +
127     * +
128     * @param string $columns  +
129     * @return void +
130     */ +
131    public function processChangedColumns($columns) +
132    { +
133        foreach ($columns as $column) { +
134            $conn = $this->getConnection($column['tableName']); +
135             +
136            $options = array(); +
137            $options = $column['options']; +
138            $options['type'] = $column['type']; +
139             +
140            $conn->export->alterTable($column['tableName'], array('change' => array($column['columnName'] => array('definition' => $options)))); +
141        }   +
142    } +
143 +
144    /** +
145     * processRemovedColumns +
146     * +
147     * @param string $columns  +
148     * @return void +
149     */ +
150    public function processRemovedColumns($columns) +
151    { +
152        foreach ($columns as $column) { +
153            $conn = $this->getConnection($column['tableName']); +
154             +
155            $conn->export->alterTable($column['tableName'], array('remove' => array($column['columnName'] => array()))); +
156        } +
157    } +
158 +
159    /** +
160     * processAddexIndexes +
161     * +
162     * @param string $indexes  +
163     * @return void +
164     */ +
165    public function processAddedIndexes($indexes) +
166    { +
167        foreach ($indexes as $index) { +
168            $conn = $this->getConnection($index['tableName']); +
169             +
170            $conn->export->createIndex($index['tableName'], $index['indexName'], $index['definition']); +
171        } +
172    } +
173 +
174    /** +
175     * processRemovedIndexes +
176     * +
177     * @param string $indexes  +
178     * @return void +
179     */ +
180    public function processRemovedIndexes($indexes) +
181    { +
182        foreach ($indexes as $index) { +
183            $conn = $this->getConnection($index['tableName']); +
184             +
185            $conn->export->dropIndex($index['tableName'], $index['indexName']); +
186        }  +
187    } +
188 +
189    /** +
190     * processCreatedConstraints +
191     * +
192     * @param string $constraints  +
193     * @return void +
194     */ +
195    public function processCreatedConstraints($constraints) +
196    { +
197        foreach ($constraints as $constraint) { +
198            $conn = $this->getConnection($constraint['tableName']); +
199            $conn->export->createConstraint($constraint['tableName'], $constraint['constraintName'], +
200                    $constraint['definition']); +
201        } +
202    } +
203 +
204    /** +
205     * processDroppedConstraints +
206     * +
207     * @param string $constraints  +
208     * @return void +
209     */ +
210    public function processDroppedConstraints($constraints) +
211    { +
212        foreach ($constraints as $constraint) { +
213            $conn = $this->getConnection($constraint['tableName']); +
214            $conn->export->dropConstraint($constraint['tableName'], $constraint['constraintName'], +
215                    $constraint['primary']); +
216        } +
217    } +
218 +
219    /** +
220     * processCreatedFks +
221     * +
222     * @param string $foreignKeys  +
223     * @return void +
224     */ +
225    public function processCreatedFks($foreignKeys) +
226    { +
227        foreach ($foreignKeys as $fk) { +
228            $conn = $this->getConnection($fk['tableName']); +
229            $conn->export->createForeignKey($fk['tableName'], $fk['definition']); +
230        } +
231    } +
232 +
233    /** +
234     * processDroppedFks +
235     * +
236     * @param string $foreignKeys  +
237     * @return void +
238     */ +
239    public function processDroppedFks($foreignKeys) +
240    { +
241        foreach ($foreignKeys as $fk) { +
242            $conn = $this->getConnection($fk['tableName']); +
243            $conn->export->dropForeignKey($fk['tableName'], $fk['fkName']); +
244        } +
245    } +
246}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Schema.html b/tests/coverage/Doctrine_Schema.html deleted file mode 100644 index 6a37b1225..000000000 --- a/tests/coverage/Doctrine_Schema.html +++ /dev/null @@ -1,246 +0,0 @@ - - - Coverage for Doctrine_Schema - - -

Coverage for Doctrine_Schema

Back to coverage report

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1<?php -
2/* -
3 *  $Id: Schema.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/** -
22 * class Doctrine_Schema -
23 * Holds information on one to many databases -
24 * -
25 * @package     Doctrine -
26 * @subpackage  Schema -
27 * @link        www.phpdoctrine.com -
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL -
29 * @since       1.0 -
30 * @version     $Revision: 2702 $ -
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> -
32 */ -
33class Doctrine_Schema extends Doctrine_Schema_Object implements Countable, IteratorAggregate -
34{ -
35    /** -
36     * Holds any number of databases contained in the schema -
37     * @access private -
38     */ -
39    private $childs; -
40 -
41    /** -
42     * -
43     * @param Doctrine_Schema_Database database      * @return -
44     * @access public -
45     */ -
46    public function addDatabase( Doctrine_Schema_Database $database ) -
47    { -
48         $this->childs[] = $database; -
49    } -
50 -
51    /** -
52     * Return the childs for this schema -
53     * -
54     * @return array of Doctrine_Schema_Database -
55     * -
56     */ -
57    public function getDatabases() { -
58         return $this->childs; -
59    } -
60    /** -
61     * -
62     * @return -
63     * @access public -
64     */ -
65    public function __toString( ) -
66    { -
67 -
68    } -
69    /** -
70     * -
71     * @return bool -
72     * @access public -
73     */ -
74    public function isValid( ) -
75    { -
76 -
77    } -
78} -
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Schema_Database.html b/tests/coverage/Doctrine_Schema_Database.html deleted file mode 100644 index 01ed6fc10..000000000 --- a/tests/coverage/Doctrine_Schema_Database.html +++ /dev/null @@ -1,291 +0,0 @@ - - - Coverage for Doctrine_Schema_Database - - -

Coverage for Doctrine_Schema_Database

Back to coverage report

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 */ -
21Doctrine::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 */ -
35class 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} -
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Schema_Exception.html b/tests/coverage/Doctrine_Schema_Exception.html deleted file mode 100644 index 696d9fb1c..000000000 --- a/tests/coverage/Doctrine_Schema_Exception.html +++ /dev/null @@ -1,117 +0,0 @@ - - - Coverage for Doctrine_Schema_Exception - - -

Coverage for Doctrine_Schema_Exception

Back to coverage report

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1<?php -
2/* -
3 *  $Id: Exception.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 */ -
21Doctrine::autoload('Doctrine_Exception'); -
22/** -
23 * class Doctrine_Schema_Exception -
24 * -
25 * @package     Doctrine -
26 * @subpackage  Schema -
27 * @link        www.phpdoctrine.com -
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL -
29 * @since       1.0 -
30 * @version     $Revision: 2702 $ -
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> -
32 * @author      Jukka Hassinen <Jukka.Hassinen@BrainAlliance.com> -
33 */ -
34class Doctrine_Schema_Exception extends Exception -
35{ } -
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Schema_Object.html b/tests/coverage/Doctrine_Schema_Object.html deleted file mode 100644 index 8b96e131a..000000000 --- a/tests/coverage/Doctrine_Schema_Object.html +++ /dev/null @@ -1,318 +0,0 @@ - - - Coverage for Doctrine_Schema_Object - - -

Coverage for Doctrine_Schema_Object

Back to coverage report

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1<?php -
2/* -
3 *  $Id: Object.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 */ -
21Doctrine::autoload('Doctrine_Access'); -
22/** -
23 * class Doctrine_Schema_Object -
24 * Catches any non-property call from child classes and throws an exception. -
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 */ -
35abstract class Doctrine_Schema_Object extends Doctrine_Access implements IteratorAggregate, Countable -
36{ -
37 -
38    protected $children   = array(); -
39 -
40    protected $definition = array('name' => ''); -
41 -
42    public function __construct(array $definition = array()) { -
43        foreach ($this->definition as $key => $val) { -
44            if (isset($definition[$key])) { -
45                $this->definition[$key] = $definition[$key]; -
46            } -
47        } -
48    } -
49 -
50    public function get($name) -
51    { -
52        if ( ! array_key_exists($name, $this->definition)) { -
53            throw new Doctrine_Schema_Exception('Unknown definition '. $name); -
54        } -
55        return $this->definition[$name]; -
56 -
57    } -
58 -
59    public function set($name, $value) -
60    { -
61        if ( ! array_key_exists($name, $this->definition)) { -
62            throw new Doctrine_Schema_Exception('Unknown definition '. $name); -
63        } -
64        $this->definition[$name] = $value; -
65    } -
66 -
67    public function contains($name) -
68    { -
69        return array_key_exists($name, $this->definition); -
70    } -
71 -
72    public function toArray() -
73    { -
74        return $this->definition; -
75    } -
76    /** -
77     * -
78     * @return int -
79     * @access public -
80     */ -
81    public function count() -
82    { -
83        if ( ! empty($this->children)) { -
84            return count($this->children); -
85        } -
86        return count($this->definition); -
87    } -
88 -
89    /** -
90     * getIterator -
91     * -
92     * @return ArrayIterator -
93     * @access public -
94     */ -
95    public function getIterator() -
96    { -
97        if ( ! empty($this->children)) { -
98            return new ArrayIterator($this->children); -
99        } -
100        return new ArrayIterator($this->definition); -
101    } -
102} -
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Schema_Relation.html b/tests/coverage/Doctrine_Schema_Relation.html deleted file mode 100644 index b42b5fd6e..000000000 --- a/tests/coverage/Doctrine_Schema_Relation.html +++ /dev/null @@ -1,375 +0,0 @@ - - - Coverage for Doctrine_Schema_Relation - - -

Coverage for Doctrine_Schema_Relation

Back to coverage report

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1<?php -
2/* -
3 *  $Id: Relation.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 */ -
21Doctrine::autoload('Doctrine_Schema_Object'); -
22/** -
23 * class Doctrine_Schema_Relation -
24 * Holds information on a foreign key relation. -
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 */ -
35class Doctrine_Schema_Relation extends Doctrine_Schema_Object -
36{ -
37 -
38    /** -
39     * Column that refers to another table -
40     * @access public -
41     */ -
42    public $referencingColumn; -
43 -
44    /** -
45     * Column that is referred from another table -
46     * @access public -
47     */ -
48    public $referencedColumn; -
49 -
50    /** -
51     * Table where the referred column lives -
52     * @access public -
53     * -
54    */ -
55    public $referencedTable; -
56 -
57    /** -
58     * ON UPDATE or ON DELETE action -
59     * @static -
60     * @access public -
61     */ -
62    public static $ACTION_RESTRICT = 1; -
63 -
64    /** -
65     * ON UPDATE or ON DELETE action -
66     * @static -
67     * @access public -
68     */ -
69    public static $ACTION_SET_NULL = 2; -
70 -
71    /** -
72     * ON UPDATE or ON DELETE action -
73     * @static -
74     * @access public -
75     */ -
76    public static $ACTION_CASCADE = 3; -
77 -
78    /** -
79     * ON UPDATE or ON DELETE action -
80     * @static -
81     * @access public -
82     */ -
83    public static $ACTION_NO_ACTION = 4; -
84 -
85    /** -
86     * ON UPDATE or ON DELETE action -
87     * @static -
88     * @access public -
89     */ -
90    public static $ACTION_SET_DEFAULT = 5; -
91 -
92    /** -
93     * -
94     * @param Doctrine_Schema_Column referencing -
95     * @param Doctrine_Schema_Table referencedtable -
96     * @param Doctrine_Schema_Column referencedColumn -
97     * @return -
98     * @access public -
99     */ -
100    public function setRelationBetween( $referencingColumn, $referencedTable, $referencedColumn ) -
101    { -
102        $this->referencingColumn = $referencingColumn; -
103        $this->referencedTable = $referencedTable; -
104        $this->referencedColumn = $referencedColumn; -
105    } -
106    /** -
107     * @return string -
108     */ -
109    public function __toString( ) -
110    { -
111        return "Relation between '".$this->referencingColumn."' and '".$this->referencedTable."'.'".$this->referencingColumn."'"; -
112    } -
113    /** -
114     * -
115     * @return bool -
116     */ -
117    public function isValid( ) -
118    { -
119 -
120    } -
121} -
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Schema_Table.html b/tests/coverage/Doctrine_Schema_Table.html deleted file mode 100644 index 4c735c5b8..000000000 --- a/tests/coverage/Doctrine_Schema_Table.html +++ /dev/null @@ -1,330 +0,0 @@ - - - Coverage for Doctrine_Schema_Table - - -

Coverage for Doctrine_Schema_Table

Back to coverage report

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1<?php -
2/* -
3 *  $Id: Table.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 */ -
21Doctrine::autoload('Doctrine_Schema_Object'); -
22/** -
23 * class Doctrine_Schema_Table -
24 * Holds information on a database table -
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 */ -
35class Doctrine_Schema_Table extends Doctrine_Schema_Object implements Countable, IteratorAggregate -
36{ -
37 -
38    protected $definition = array('name'        => '', -
39                                  'check'       => '', -
40                                  'charset'     => '', -
41                                  'description' => ''); -
42    /** -
43     * Relations this table has with others. An array of Doctrine_Schema_Relation -
44     */ -
45    private $relations = array(); -
46    /** -
47     * -
48     * @return bool -
49     * @access public -
50     */ -
51    public function isValid( ) -
52    { -
53 -
54    } -
55    /** -
56     * returns an array of Doctrine_Schema_Column objects -
57     * -
58     * @return array -
59     */ -
60    public function getColumns() -
61    { -
62        return $this->children; -
63    } -
64    /** -
65     * @return Doctrine_Schema_Column|false -
66     */ -
67    public function getColumn($name) -
68    { -
69        if ( ! isset($this->children[$name])) { -
70            return false; -
71        } -
72        return $this->children[$name]; -
73    } -
74    /** -
75     * -
76     * @param Doctrine_Schema_Column column -
77     * @return Doctrine_Schema_Table -
78     * @access public -
79     */ -
80    public function addColumn(Doctrine_Schema_Column $column) -
81    { -
82        $name = $column->get('name'); -
83        $this->children[$name] = $column; -
84 -
85        return $this; -
86    } -
87 -
88    /** -
89     * Adds a relation between a local column and a 2nd table / column -
90     * -
91     * @param Doctrine_Schema_Relation Relation -
92     * -
93    */ -
94    public function setRelation(Doctrine_Schema_Relation $relation) { -
95         $this->relations[] = $relation; -
96    } -
97    /** -
98     * Return all the relations this table has with others -
99     * -
100     * @return array Array of Doctrine_Schema_Relation -
101    */ -
102    public function getRelations() { -
103        return $this->relations; -
104    } -
105 -
106} -
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Schema_Column.html b/tests/coverage/Doctrine_Search_File.html old mode 100644 new mode 100755 similarity index 56% rename from tests/coverage/Doctrine_Schema_Column.html rename to tests/coverage/Doctrine_Search_File.html index 71968ee3e..fe64ece47 --- a/tests/coverage/Doctrine_Schema_Column.html +++ b/tests/coverage/Doctrine_Search_File.html @@ -1,6 +1,6 @@ - Coverage for Doctrine_Schema_Column + Coverage for Doctrine_Search_File -

Coverage for Doctrine_Schema_Column

Back to coverage report

+

Coverage for Doctrine_Search_File

Back to coverage report

@@ -16,7 +16,7 @@ - - - - - - + + + - - - - - - - - - - - - + - + + + + + + + - - + - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 <?php
/*
3 *  $Id: Column.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ + *  $Id$
4  * @@ -70,168 +70,147 @@  */
21Doctrine::autoload('Doctrine_Schema_Object'); +
22 /**
23 * class Doctrine_Schema_Column + * Doctrine_Search
24 * Holds information on a database table field -
25  *
26
25  * @package     Doctrine
26 * @subpackage  Search +
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> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL
34
29 * @version     $Revision$ +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32  */
35class Doctrine_Schema_Column extends Doctrine_Schema_Object implements IteratorAggregate +
33class Doctrine_Search_File extends Doctrine_Search
36
34 {
35    public function __construct(array $options = array()) +
36    { +
37    /** +        parent::__construct($options);
38     * column definitions -
39     * @var array $definition -
40     */ -
41    protected $definition = array('name'    => '', -
42                                  'type'    => '', -
43                                  'length'  => null, -
44                                  'unique'  => false, -
45                                  'primary' => false, -
46                                  'notnull' => false, -
47                                  'default' => false, -
48                                  'autoinc' => false -
49                                  ); -
50
39        if ( ! isset($this->_options['resource'])) { +
40            $table = new Doctrine_Table('File', Doctrine_Manager::connection()); +
41             +
42            $table->setColumn('url', 'string', 255, array('primary' => true)); +
43 +
44            $this->_options['resource'] = $table; +
45        } +
46         +
47        if (empty($this->_options['fields'])) { +
48            $this->_options['fields'] = array('url', 'content'); +
49        } +
50         +
51    public function getName() +        $this->buildDefinition();
52    { +    }
53        return $this->definition['name']; +    
54    } +    public function indexDirectory($dir)
55    public function getType() +    {
56    { +        $it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir),
57        return $this->definition['type']; +                                                RecursiveIteratorIterator::LEAVES_ONLY);
58    } +                                                
59    public function isUnique() +        foreach ($it as $file) {
60    { +            if (strpos($file, DIRECTORY_SEPARATOR . '.svn') !== false) {
61        return $this->definition['unique']; +                continue;                                                          
62    } +            }
63    public function isPrimaryKey() +
64    { +            $this->updateIndex(array('url' => $file->getPathName(),
65        return $this->definition['primary']; +                                     'content' => file_get_contents($file)));
66    } +        }
67    public function defaultValue() +    }
68    { -
69        return $this->definition['default']; -
70    } -
71    public function isNotNull() -
72    { -
73        return $this->definition['notnull']; -
74    } -
75 }
\ No newline at end of file