1 | <?php |
||
28 | abstract class XoopsDownloader |
||
29 | { |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $mimetype; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $ext; |
||
40 | |||
41 | /** |
||
42 | * @var XoopsDownloader |
||
43 | */ |
||
44 | protected $archiver; |
||
45 | |||
46 | |||
47 | /** |
||
48 | * Send the HTTP header |
||
49 | * |
||
50 | * @param string $filename |
||
51 | * @access protected |
||
52 | */ |
||
53 | protected function _header($filename) |
||
68 | } |
||
69 | } |
||
70 | |||
71 | /** |
||
72 | * @abstract |
||
73 | * @param $filepath |
||
74 | * @param boolean|string $newfilename |
||
75 | * @return void |
||
76 | */ |
||
77 | abstract function addFile($filepath, $newfilename = null); |
||
|
|||
78 | |||
79 | /** |
||
80 | * @abstract |
||
81 | * @param $filepath |
||
82 | * @param null $newfilename |
||
83 | * @return void |
||
84 | */ |
||
85 | abstract function addBinaryFile($filepath, $newfilename = null); |
||
86 | |||
87 | /** |
||
88 | * @abstract |
||
89 | * @param $data |
||
90 | * @param $filename |
||
91 | * @param int $time |
||
92 | * @return void |
||
93 | */ |
||
94 | abstract function addFileData(&$data, $filename, $time = 0); |
||
95 | |||
96 | /** |
||
97 | * @abstract |
||
98 | * @param $data |
||
99 | * @param $filename |
||
100 | * @param int $time |
||
101 | * @return void |
||
102 | */ |
||
103 | abstract function addBinaryFileData(&$data, $filename, $time = 0); |
||
104 | |||
105 | /** |
||
106 | * @abstract |
||
107 | * @param $name |
||
108 | * @param bool $gzip |
||
109 | * @return void |
||
110 | */ |
||
111 | abstract function download($name, $gzip = true); |
||
112 | } |
||
113 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.