http://phing.info/

Source Code Coverage

Designed for use with PHPUnit2, Xdebug and Phing.

Methods: 3 LOC: 79 Statements: 4

Source file Statements Methods Total coverage
Abstract.php 100.0% 100.0% 100.0%
 
1
<?php
2
/**
3
 * Xyster Framework
4
 *
5
 * LICENSE
6
 *
7
 * This source file is subject to the new BSD license that is bundled
8
 * with this package in the file LICENSE.txt.
9
 * It is also available through the world-wide-web at this URL:
10
 * http://www.opensource.org/licenses/bsd-license.php
11
 * If you did not receive a copy of the license and are unable to
12
 * obtain it through the world-wide-web, please send an email
13
 * to xyster@devweblog.org so we can send you a copy immediately.
14
 *
15
 * @category  Xyster
16
 * @package   Xyster_Orm
17
 * @copyright Copyright (c) 2007 Irrational Logic (http://devweblog.org)
18
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD License
19
 * @version   $Id: Abstract.php 74 2007-08-19 15:49:31Z doublecompile $
20
 */
21
/**
22
 * @see Xyster_Orm_Mapper_Factory_Interface
23
 */
24 1
require_once 'Xyster/Orm/Mapper/Factory/Interface.php';
25
/**
26
 * A simple factory for creating mappers
27
 *
28
 * @category  Xyster
29
 * @package   Xyster_Orm
30
 * @copyright Copyright (c) 2007 Irrational Logic (http://devweblog.org)
31
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD License
32
 */
33
abstract class Xyster_Orm_Mapper_Factory_Abstract implements Xyster_Orm_Mapper_Factory_Interface
34
{
35
    /**
36
     * The manager containing this factory
37
     *
38
     * @var Xyster_Orm_Manager
39
     */
40
    protected $_manager;
41
42
    /**
43
     * A place to cache instantiated mappers
44
     *
45
     * @var array
46
     */
47
    protected $_mappers = array();
48
49
    /**
50
     * Gets the entity meta for a given class
51
     *
52
     * @param string $className The name of the entity class
53
     * @return Xyster_Orm_Entity_Meta The meta object
54
     */
55
    public function getEntityMeta( $className )
56
    {
57 55
        return $this->get($className)->getEntityMeta();
58
    }
59
60
    /**
61
     * Gets the manager containing this factory
62
     *
63
     * @return Xyster_Orm_Manager
64
     */
65
    public function getManager()
66
    {
67 105
        return $this->_manager;
68
    }
69
70
    /**
71
     * Sets the manager that contains this factory
72
     *
73
     * @param Xyster_Orm_Manager $manager
74
     */
75
    public function setManager( Xyster_Orm_Manager $manager )
76
    {
77 219
        $this->_manager = $manager;
78
    }
79
}


Report generated at 2007-11-05T09:09:01-05:00