1 | <?php |
||
20 | class Compressor extends Abstraction implements Executable |
||
21 | { |
||
22 | /** |
||
23 | * File to compress. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $fileToCompress; |
||
28 | |||
29 | /** |
||
30 | * Force overwrite. |
||
31 | * |
||
32 | * @var boolean |
||
33 | */ |
||
34 | protected $force = false; |
||
35 | |||
36 | /** |
||
37 | * Constructor. |
||
38 | * |
||
39 | * @param string $cmd |
||
40 | * @param string $path |
||
41 | */ |
||
42 | 5 | public function __construct($cmd, $path = null) |
|
47 | |||
48 | /** |
||
49 | * Set the file to compress. |
||
50 | * |
||
51 | * @param string $path |
||
52 | * @return \phpbu\App\Cli\Executable\Compressor |
||
53 | * @throws \phpbu\App\Exception |
||
54 | */ |
||
55 | 4 | public function compressFile($path) |
|
63 | |||
64 | /** |
||
65 | * Use '-f' force mode. |
||
66 | * |
||
67 | * @param boolean $bool |
||
68 | * @return \phpbu\App\Cli\Executable\Compressor |
||
69 | */ |
||
70 | 3 | public function force($bool) |
|
75 | |||
76 | /** |
||
77 | * Process generator |
||
78 | * |
||
79 | * @throws \phpbu\App\Exception |
||
80 | */ |
||
81 | 4 | protected function createProcess() |
|
99 | } |
||
100 |