1: <?php
2: /**
3: * The base class that all compress drivers should extend.
4: *
5: * Copyright 2011-2012 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 Compress
14: */
15: class Horde_Compress_Base
16: {
17: /**
18: * Does this driver support compressing data?
19: *
20: * @var boolean
21: */
22: public $canCompress = false;
23:
24: /**
25: * Does this driver support decompressing data?
26: *
27: * @var boolean
28: */
29: public $canDecompress = false;
30:
31: /**
32: * Compress the data.
33: *
34: * @param mixed $data The data to compress.
35: * @param array $params An array of arguments needed to compress the
36: * data.
37: *
38: * @return mixed The compressed data.
39: * @throws Horde_Compress_Exception
40: */
41: public function compress($data, array $params = array())
42: {
43: return $data;
44: }
45:
46: /**
47: * Decompress the data.
48: *
49: * @param mixed $data The data to decompress.
50: * @param array $params An array of arguments needed to decompress the
51: * data.
52: *
53: * @return mixed The decompressed data.
54: * @throws Horde_Compress_Exception
55: */
56: public function decompress($data, array $params = array())
57: {
58: return $data;
59: }
60:
61: }
62: