1: <?php
2: /**
3: * The Horde_SyncMl_Command_Get class provides a SyncML implementation of the
4: * Get command as defined in SyncML Representation Protocol, version 1.1,
5: * section 5.5.7.
6: *
7: * The Get command is used to retrieve data from the recipient. The
8: * Horde_SyncMl_Command_Get class responds to a client Get request and returns
9: * the DevInf information for the SyncML server.
10: *
11: * Copyright 2003-2012 Horde LLC (http://www.horde.org/)
12: *
13: * See the enclosed file COPYING for license information (LGPL). If you
14: * did not receive this file, see http://www.horde.org/licenses/lgpl21.
15: *
16: * @author Karsten Fourmont <fourmont@gmx.de>
17: * @author Jan Schneider <jan@horde.org>
18: * @package SyncMl
19: */
20: class Horde_SyncMl_Command_Get extends Horde_SyncMl_Command
21: {
22: /**
23: * Name of the command.
24: *
25: * @var string
26: */
27: protected $_cmdName = 'Get';
28:
29: /**
30: * Implements the actual business logic of the Alert command.
31: */
32: public function handleCommand($debug = false)
33: {
34: $state = $GLOBALS['backend']->state;
35:
36: // Create status response.
37: $this->_outputHandler->outputStatus($this->_cmdID, $this->_cmdName,
38: Horde_SyncMl::RESPONSE_OK,
39: $state->getDevInfURI());
40: if (!$state->authenticated) {
41: return;
42: }
43:
44: $this->_outputHandler->outputDevInf($this->_cmdID);
45: }
46: }
47: