1: <?php
2: /**
3: * Indicates a missing value when reading or writing a Kolab Format object.
4: *
5: * PHP version 5
6: *
7: * @category Kolab
8: * @package Kolab_Format
9: * @author Gunnar Wrobel <wrobel@pardus.de>
10: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
11: * @link http://www.horde.org/libraries/Horde_Kolab_Format
12: */
13:
14: /**
15: * Indicates a missing value when reading or writing a Kolab Format object.
16: *
17: * Copyright 2011-2012 Horde LLC (http://www.horde.org/)
18: *
19: * See the enclosed file COPYING for license information (LGPL). If you
20: * did not receive this file, see http://www.horde.org/licenses/lgpl21.
21: *
22: * @category Kolab
23: * @package Kolab_Format
24: * @author Gunnar Wrobel <wrobel@pardus.de>
25: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
26: * @link http://www.horde.org/libraries/Horde_Kolab_Format
27: */
28: class Horde_Kolab_Format_Exception_MissingValue
29: extends Horde_Kolab_Format_Exception
30: {
31: /**
32: * The name of the value that was missing.
33: *
34: * @var string
35: */
36: private $_value;
37:
38: /**
39: * Constructor.
40: *
41: * @param string $value The value that was missing.
42: */
43: public function __construct($value)
44: {
45: $this->_value = $value;
46: parent::__construct(
47: sprintf(
48: "Data value for \"%s\" is empty in the Kolab XML object!",
49: $value
50: )
51: );
52: }
53:
54: /**
55: * Return the name of the missing value.
56: *
57: * @return string The name
58: */
59: public function getValue()
60: {
61: return $this->_value;
62: }
63: }