1 | <?php |
||
17 | abstract class Abstraction implements Compression |
||
18 | { |
||
19 | /** |
||
20 | * Command name |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $cmd; |
||
25 | |||
26 | /** |
||
27 | * Path to command binary |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $path; |
||
32 | |||
33 | /** |
||
34 | * Suffix for compressed files |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $suffix; |
||
39 | |||
40 | /** |
||
41 | * MIME type for compressed files |
||
42 | * |
||
43 | * @var string |
||
44 | */ |
||
45 | protected $mimeType; |
||
46 | |||
47 | /** |
||
48 | * Can this compression compress piped output |
||
49 | * |
||
50 | * @var bool |
||
51 | */ |
||
52 | protected $pipeable; |
||
53 | |||
54 | /** |
||
55 | * Constructor. |
||
56 | * |
||
57 | * @param string $path |
||
58 | */ |
||
59 | public function __construct($path = null) |
||
63 | |||
64 | /** |
||
65 | * Return the cli command. |
||
66 | * |
||
67 | * @return string |
||
68 | */ |
||
69 | public function getCommand() |
||
73 | |||
74 | /** |
||
75 | * Path getter. |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | public function getPath() |
||
83 | |||
84 | /** |
||
85 | * Returns the compressor suffix e.g. 'bz2'. |
||
86 | * |
||
87 | * @return string |
||
88 | */ |
||
89 | public function getSuffix() |
||
93 | |||
94 | /** |
||
95 | * Is the compression app pipeable. |
||
96 | * |
||
97 | * @return bool |
||
98 | */ |
||
99 | public function isPipeable() |
||
103 | |||
104 | /** |
||
105 | * Returns the compressor mime type. |
||
106 | * |
||
107 | * @return string |
||
108 | */ |
||
109 | public function getMimeType() |
||
113 | } |
||
114 |