@@ -2,14 +2,35 @@ discard block |
||
2 | 2 | |
3 | 3 | interface SubtitleContract { |
4 | 4 | |
5 | + /** |
|
6 | + * @return void |
|
7 | + */ |
|
5 | 8 | public static function convert($from_file_path, $to_file_path); |
6 | 9 | |
10 | + /** |
|
11 | + * @return Subtitles |
|
12 | + */ |
|
7 | 13 | public static function load($file_name, $extension = null); // load file |
14 | + |
|
15 | + /** |
|
16 | + * @return Subtitles |
|
17 | + */ |
|
8 | 18 | public function save($file_name); // save file |
9 | 19 | public function content($format); // output file content (instead of saving to file) |
10 | 20 | |
21 | + /** |
|
22 | + * @return Subtitles |
|
23 | + */ |
|
11 | 24 | public function add($start, $end, $text); // add one line // @TODO ability to add multilines |
25 | + |
|
26 | + /** |
|
27 | + * @return Subtitles |
|
28 | + */ |
|
12 | 29 | public function remove($from, $till); // delete test from subtitles |
30 | + |
|
31 | + /** |
|
32 | + * @return Subtitles |
|
33 | + */ |
|
13 | 34 | public function time($seconds); // shift time |
14 | 35 | |
15 | 36 | |
@@ -32,6 +53,10 @@ discard block |
||
32 | 53 | |
33 | 54 | |
34 | 55 | // input |
56 | + |
|
57 | + /** |
|
58 | + * @return Subtitles |
|
59 | + */ |
|
35 | 60 | public static function loadString($string, $extension); |
36 | 61 | |
37 | 62 | // chose format |
@@ -182,6 +207,9 @@ discard block |
||
182 | 207 | // )); |
183 | 208 | // } |
184 | 209 | |
210 | + /** |
|
211 | + * @param string $format |
|
212 | + */ |
|
185 | 213 | public function content($format) |
186 | 214 | { |
187 | 215 | $format = strtolower(trim($format, '.')); |