http://phing.info/

Source Code Coverage

Designed for use with PHPUnit2, Xdebug and Phing.

Methods: 4 LOC: 75 Statements: 6
Legend: executednot executeddead code
Source file Statements Methods Total coverage
Autowire.php 100.0% 100.0% 100.0%
 
1
<?php
2
3
/**
4
 * Xyster Framework
5
 *
6
 * This source file is subject to the new BSD license that is bundled
7
 * with this package in the file LICENSE.txt.
8
 * It is also available through the world-wide-web at this URL:
9
 * http://www.opensource.org/licenses/bsd-license.php
10
 *
11
 * @category  Xyster
12
 * @package   Xyster_Container
13
 * @copyright Copyright LibreWorks, LLC (http://libreworks.net)
14
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD License
15
 * @version   $Id$
16
 */
17
namespace Xyster\Container;
18
19
use Xyster\Enum\Enum;
20
21
/**
22
 * Autowiring modes
23
 *
24
 * @category  Xyster
25
 * @package   Xyster_Container
26
 * @copyright Copyright LibreWorks, LLC (http://libreworks.net)
27
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD License
28
 */
29
class Autowire extends Enum
30 1
{
31
    const None = 0;
32
    const ByName = 1;
33
    const ByType = 2;
34
    const Constructor = 3;
35
36
    /**
37
     * No autowiring
38
     *
39
     * @return Autowire
40
     */
41
    static public function None()
42
    {
43 2
        return Enum::_factory();
44
    }
45
46
    /**
47
     * Autowiring by property name
48
     *
49
     * @return Autowire
50
     */
51
    static public function ByName()
52
    {
53 9
        return Enum::_factory();
54
    }
55
56
    /**
57
     * Autowiring by property type
58
     *
59
     * @return Autowire
60
     */
61
    static public function ByType()
62
    {
63 13
        return Enum::_factory();
64
    }
65
66
    /**
67
     * Autowiring by constructor arguments
68
     *
69
     * @return Autowire
70
     */
71
    static public function Constructor()
72
    {
73 12
        return Enum::_factory();
74
    }
75 1
}


Report generated at 2010-10-18T17:19:49-04:00