@@ 21-28 (lines=8) @@ | ||
18 | ||
19 | class rss { |
|
20 | ||
21 | public static function loadFromUrl($url, $username='', $password='') { |
|
22 | /* Loads an rss feed from a url */ |
|
23 | $context = pobject::getContext(); |
|
24 | $me = $context['arCurrentObject']; |
|
25 | $rss = new rssFeed($me); |
|
26 | $rss->setFeedUrl($url, $username, $password); |
|
27 | return $rss; |
|
28 | } |
|
29 | ||
30 | public static function loadFromString($string) { |
|
31 | $context = pobject::getContext(); |
|
@@ 30-37 (lines=8) @@ | ||
27 | return $rss; |
|
28 | } |
|
29 | ||
30 | public static function loadFromString($string) { |
|
31 | $context = pobject::getContext(); |
|
32 | $me = $context["arCurrentObject"]; |
|
33 | /* parse rss feed and initialize and return an rssFeed object */ |
|
34 | $rss = new rssFeed($me); |
|
35 | $rss->setFeedString($string); |
|
36 | return $rss; |
|
37 | } |
|
38 | ||
39 | } |
|
40 |