# Coverage for Doctrine_Hydrate_Array

Back to coverage report

1 | <?php
2 | /*
3 | * $Id$
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.org>.
20 | */
21 |
22 | /**
23 | * Doctrine_Hydrate_Array
24 | * defines an array fetching strategy for Doctrine_Hydrate
25 | *
26 | * @package Doctrine
27 | * @subpackage Hydrate
28 | * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
29 | * @link www.phpdoctrine.org
30 | * @since 1.0
31 | * @version $Revision$
32 | * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
33 | */
34 | class Doctrine_Hydrate_Array
35 | {
36 | public function getElementCollection($component)
37 | {
38 | return array();
39 | }
40 | public function getElement(array $data, $component)
41 | {
42 | return $data;
43 | }
44 | public function isIdentifiable(array $data, Doctrine_Table $table)
45 | {
46 | return ( ! empty($data));
47 | }
48 | public function registerCollection($coll)
49 | {
50 |
51 | }
52 | public function initRelated(array &$data, $name)
53 | {
54 | if ( ! isset($data[$name])) {
55 | $data[$name] = array();
56 | }
57 | return true;
58 | }
59 | public function getNullPointer()
60 | {
61 | return null;
62 | }
63 | public function getLastKey(&$data)
64 | {
65 | end($data);
66 | return key($data);
67 | }
68 |
69 | public function flush()
70 | {
71 |
72 | }
73 | }