http://phing.info/

Source Code Coverage

Designed for use with PHPUnit2, Xdebug and Phing.

Methods: 5 LOC: 76 Statements: 7

Source file Statements Methods Total coverage
Entry.php 100.0% 100.0% 100.0%
 
1
<?php
2
/**
3
 * Xyster Framework
4
 *
5
 * This source file is subject to the new BSD license that is bundled
6
 * with this package in the file LICENSE.txt.
7
 * It is also available through the world-wide-web at this URL:
8
 * http://www.opensource.org/licenses/bsd-license.php
9
 *
10
 * @category  Xyster
11
 * @package   Xyster_Collection
12
 * @copyright Copyright (c) 2007-2008 Irrational Logic (http://irrationallogic.net)
13
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD License
14
 */
15
/**
16
 * Simple Map Entry
17
 *
18
 * @category  Xyster
19
 * @package   Xyster_Collection
20
 * @copyright Copyright (c) 2007-2008 Irrational Logic (http://irrationallogic.net)
21
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD License
22
 */
23
class Xyster_Collection_Map_Entry
24
{
25
    protected $_key;
26
    protected $_value;
27
28
    /**
29
     * Creates a new map entry
30
     *
31
     * @param mixed $key The key of the entry
32
     * @param mixed $value The value of the entry
33
     */
34
	public function __construct( $key, $value )
35
	{
36 29
		$this->_key = $key;
37 29
		$this->_value = $value;
38
	}
39
40
	/**
41
	 * Gets the key for this mapping
42
	 *
43
	 * @return mixed The key
44
	 */
45
	public function getKey()
46
	{
47 11
		return $this->_key;
48
	}
49
	/**
50
	 * Gets the value for this mapping
51
	 *
52
	 * @return mixed The value
53
	 */
54
	public function getValue()
55
	{
56 15
		return $this->_value;
57
	}
58
	/**
59
	 * Sets the value for this mapping
60
	 *
61
	 * @param mixed $value The new value
62
	 */
63
	public function setValue( $value )
64
	{
65 1
		$this->_value = $value;
66
	}
67
	/**
68
	 * Gets the string equivalent of this mapping
69
	 *
70
	 * @return string
71
	 */
72
    public function __toString()
73
    {
74 1
        return $this->_key . "=" . $this->_value;
75
    }
76
}


Report generated at 2008-01-20T12:13:39-05:00