1<?php
2/**
3 * Handles iTip response options for Horde iTip responses.
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 * Handles iTip response options for Horde iTip responses.
16 *
17 * Copyright 2010-2016 Horde LLC (http://www.horde.org/)
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 */
29class Horde_Itip_Response_Options_Horde
30extends Horde_Itip_Response_Options_Base
31{
32    /**
33     * The MIME character set.
34     *
35     * @var string
36     */
37    private $_charset;
38
39    /**
40     * Options for setting the "Received" MIME header.
41     *
42     * @var array
43     */
44    private $_received_options;
45
46    /**
47     * Constructor.
48     *
49     * @param string $charset          The MIME character set that should be
50     *                                 used.
51     * @param array  $received_options Options for setting the "Received" MIME
52     *                                 header.
53     */
54    public function __construct($charset, $received_options)
55    {
56        $this->_charset          = $charset;
57        $this->_received_options = $received_options;
58    }
59    /**
60     * Prepare the iCalendar MIME part of the response message.
61     *
62     * @param Horde_Mime_Part $ics The iCalendar MIME part of the response
63     *                             message.
64     *
65     * @return NULL
66     */
67    public function prepareResponseMimeHeaders(Horde_Mime_Headers $headers)
68    {
69        $headers->addHeaderOb(Horde_Mime_Headers_MessageId::create());
70    }
71
72    /**
73     * Get the character set for the response mime parts.
74     *
75     * @return string The character set.
76     */
77    public function getCharacterSet()
78    {
79        return $this->_charset;
80    }
81
82    /**
83     * Get the product ID of the iCalendar object embedded in the MIME response.
84     *
85     * @return string The product ID.
86     */
87    public function getProductId()
88    {
89        return '-//The Horde Project//' . strval(Horde_Mime_Headers_UserAgent::create()) . '//EN';
90    }
91}
92