1: <?php
2: /**
3: * A library for reading/writing the Kolab format.
4: *
5: * PHP version 5
6: *
7: * @category Kolab
8: * @package Kolab_Format
9: * @author Gunnar Wrobel <wrobel@pardus.de>
10: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
11: * @link http://www.horde.org/libraries/Horde_Kolab_Format
12: */
13:
14: /**
15: * The Horde_Kolab_Format:: interface defines the basic properties of a Kolab
16: * format handler.
17: *
18: * Copyright 2007-2010 Klarälvdalens Datakonsult AB
19: * Copyright 2010-2012 Horde LLC (http://www.horde.org/)
20: *
21: * See the enclosed file COPYING for license information (LGPL). If you did not
22: * receive this file, see
23: * http://www.horde.org/licenses/lgpl21.
24: *
25: * @category Kolab
26: * @package Kolab_Format
27: * @author Gunnar Wrobel <wrobel@pardus.de>
28: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
29: * @link http://www.horde.org/libraries/Horde_Kolab_Format
30: */
31: interface Horde_Kolab_Format
32: {
33: /** The package version */
34: const VERSION = '@version@';
35:
36: /**
37: * Load an object based on the given XML stream. The stream may only contain
38: * UTF-8 data.
39: *
40: * @param resource $xml The XML stream of the message.
41: * @param array $options Additional options when parsing the XML. See the
42: * concrete parsers for additional information.
43: *
44: * @return array The data array representing the object.
45: *
46: * @throws Horde_Kolab_Format_Exception
47: */
48: public function load($xml, $options = array());
49:
50: /**
51: * Convert the data to a XML stream. Strings contained in the data array may
52: * only be provided as UTF-8 data.
53: *
54: * @param array $object The data array representing the object.
55: * @param array $options Additional options when writing the XML. See the
56: * concrete parsers for additional information.
57: *
58: * @return resource The data as XML stream.
59: *
60: * @throws Horde_Kolab_Format_Exception
61: */
62: public function save($object, $options = array());
63: }
64: