1<?php
2/**
3 * Copyright 2012-2017 Horde LLC (http://www.horde.org/)
4 *
5 * See the enclosed file COPYING for license information (LGPL). If you
6 * did not receive this file, see http://www.horde.org/licenses/lgpl21.
7 *
8 * @category  Horde
9 * @copyright 2012-2017 Horde LLC
10 * @license   http://www.horde.org/licenses/lgpl21 LGPL 2.1
11 * @package   Imap_Client
12 */
13
14/**
15 * An object representing an IMAP tagged response (RFC 3501 [2.2.2]).
16 *
17 * @author    Michael Slusarz <slusarz@horde.org>
18 * @category  Horde
19 * @copyright 2012-2017 Horde LLC
20 * @license   http://www.horde.org/licenses/lgpl21 LGPL 2.1
21 * @package   Imap_Client
22 */
23class Horde_Imap_Client_Interaction_Server_Tagged
24extends Horde_Imap_Client_Interaction_Server
25{
26    /**
27     * Tag.
28     *
29     * @var string
30     */
31    public $tag;
32
33    /**
34     * @param string $tag  Response tag.
35     */
36    public function __construct(Horde_Imap_Client_Tokenize $token, $tag)
37    {
38        $this->tag = $tag;
39
40        parent::__construct($token);
41
42        if (is_null($this->status)) {
43            throw new Horde_Imap_Client_Exception(
44                Horde_Imap_Client_Translation::r("Bad tagged response.")
45            );
46        }
47    }
48
49}
50