1 | <?php |
||
14 | class Parser |
||
15 | { |
||
16 | /** |
||
17 | * Parses the html and adds the lessons the the array. |
||
18 | * |
||
19 | * @param $html |
||
20 | * @param $array |
||
21 | */ |
||
22 | public static function getAllLessons($html, &$array) |
||
39 | |||
40 | /** |
||
41 | * Determines if there is next page, false if not or the link. |
||
42 | * |
||
43 | * @param $html |
||
44 | * |
||
45 | * @return bool|string |
||
46 | */ |
||
47 | public static function hasNextPage($html) |
||
58 | |||
59 | /** |
||
60 | * Gets the token input. |
||
61 | * |
||
62 | * @param $html |
||
63 | * |
||
64 | * @return string |
||
65 | */ |
||
66 | public static function getToken($html) |
||
72 | |||
73 | /** |
||
74 | * Gets the download link. |
||
75 | * |
||
76 | * @param $html |
||
77 | * @return string |
||
78 | * @throws NoDownloadLinkException |
||
79 | */ |
||
80 | public static function getDownloadLink($html) |
||
90 | |||
91 | /** |
||
92 | * Extracts the name of the episode. |
||
93 | * |
||
94 | * @param $html |
||
95 | * |
||
96 | * @param $path |
||
97 | * @return string |
||
98 | */ |
||
99 | public static function getNameOfEpisode($html, $path) |
||
106 | } |
||
107 |