1: <?php
2: /**
3: * Simple information provider for an invited resource.
4: *
5: * PHP version 5
6: *
7: * @category Horde
8: * @package Itip
9: * @author Gunnar Wrobel <wrobel@pardus.de>
10: * @license http://www.horde.org/licenses/lgpl21 LGPL
11: * @link http://pear.horde.org/index.php?package=Itip
12: */
13:
14: /**
15: * Simple information provider for an invited resource.
16: *
17: * Copyright 2010 Kolab Systems AG
18: *
19: * See the enclosed file COPYING for license information (LGPL). If you did not
20: * receive this file, see
21: * {@link http://www.horde.org/licenses/lgpl21 LGPL}.
22: *
23: * @category Horde
24: * @package Itip
25: * @author Gunnar Wrobel <wrobel@pardus.de>
26: * @license http://www.horde.org/licenses/lgpl21 LGPL
27: * @link http://pear.horde.org/index.php?package=Itip
28: */
29: class Horde_Itip_Resource_Base
30: implements Horde_Itip_Resource
31: {
32: /**
33: * The mail address.
34: *
35: * @var string
36: */
37: private $_mail;
38:
39: /**
40: * The common name.
41: *
42: * @var string
43: */
44: private $_common_name;
45:
46: /**
47: * Constructor.
48: *
49: * @param string $mail The mail address.
50: * @param string $common_name The common name.
51: */
52: public function __construct($mail, $common_name)
53: {
54: $this->_mail = $mail;
55: $this->_common_name = $common_name;
56: }
57:
58: /**
59: * Retrieve the mail address of the resource.
60: *
61: * @return string The mail address.
62: */
63: public function getMailAddress()
64: {
65: return $this->_mail;
66: }
67:
68: /**
69: * Retrieve the reply-to address for the resource.
70: *
71: * @return string The reply-to address.
72: */
73: public function getReplyTo()
74: {
75: }
76:
77: /**
78: * Retrieve the common name of the resource.
79: *
80: * @return string The common name.
81: */
82: public function getCommonName()
83: {
84: return $this->_common_name;
85: }
86:
87: /**
88: * Retrieve the "From" address for this resource.
89: *
90: * @return string The "From" address.
91: */
92: public function getFrom()
93: {
94: return sprintf("%s <%s>", $this->_common_name, $this->_mail);
95: }
96: }