1<?php
2/**
3 * Object representation of a basic list header (RFC 2369) element.
4 *
5 * Copyright 2012-2017 Horde LLC (http://www.horde.org/)
6 *
7 * See the enclosed file COPYING for license information (LGPL). If you
8 * did not receive this file, see http://www.horde.org/licenses/lgpl21.
9 *
10 * @author    Michael Slusarz <slusarz@horde.org>
11 * @category  Horde
12 * @license   http://www.horde.org/licenses/lgpl21 LGPL 2.1
13 * @package   ListHeaders
14 */
15
16/**
17 * Object representation of a basic list header (RFC 2369) element.
18 *
19 * @author    Michael Slusarz <slusarz@horde.org>
20 * @category  Horde
21 * @license   http://www.horde.org/licenses/lgpl21 LGPL 2.1
22 * @package   ListHeaders
23 *
24 * @property string $comments  Comments.
25 * @property string $url  URL.
26 */
27class Horde_ListHeaders_Base extends Horde_ListHeaders_Object
28{
29    /**
30     * Comments.
31     *
32     * @var array
33     */
34    protected $_comments = array();
35
36    /**
37     * URL.
38     *
39     * @var string.
40     */
41    protected $_url;
42
43    /**
44     * Constructor.
45     *
46     * @param string $url      URL.
47     * @param array $comments  Comments.
48     */
49    public function __construct($url, array $comments = array())
50    {
51        $this->_url = $url;
52        $this->_comments = $comments;
53    }
54
55    /**
56     */
57    public function __get($name)
58    {
59        switch ($name) {
60        case 'comments':
61            return $this->_comments;
62
63        case 'url':
64            return $this->_url;
65        }
66    }
67
68}
69