本文整理汇总了PHP中RSS::toXML方法的典型用法代码示例。如果您正苦于以下问题:PHP RSS::toXML方法的具体用法?PHP RSS::toXML怎么用?PHP RSS::toXML使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RSS
的用法示例。
在下文中一共展示了RSS::toXML方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRSS
public function getRSS(Channel $channel, array $timeline)
{
$rss = new RSS();
$rss->setChannel($channel)->parseTimeline($timeline);
return $rss->toXML();
}
示例2: catch
function __construct()
{
/// Initialize variables
Settings::init();
/// Initialize CurrentUser
try {
CurrentUser::init();
} catch (Exception $e) {
$page = new RegisterPage(true);
$page->toHTML();
return;
}
/// Check what to do
switch (CurrentUser::$action) {
case "Rss":
$r = new RSS(Settings::$conf_dir . "/photos_feed.txt");
$r->toXML();
break;
case "Judge":
// Same as page
// Same as page
case "Page":
$page = new MainPage();
$page->toHTML();
break;
case "Logout":
case "Login":
case "Log":
$page = new LoginPage();
$page->toHTML();
break;
case "Reg":
$page = new RegisterPage();
$page->toHTML();
break;
case "JS":
$page = new JS();
break;
case "Img":
Provider::Image(CurrentUser::$path);
break;
case "BDl":
Provider::Image(CurrentUser::$path, false, true, true, true);
break;
case "Big":
Provider::Image(CurrentUser::$path, false, true);
break;
case "Thb":
Provider::Image(CurrentUser::$path, true);
break;
case "Vid":
Provider::Video(CurrentUser::$path);
break;
case "Zip":
Provider::Zip(CurrentUser::$path);
break;
case "Acc":
if (CurrentUser::$admin && isset($_POST['login'])) {
$acc = new Account($_POST['login']);
} else {
$acc = CurrentUser::$account;
}
$acc->toHTML();
break;
case "Adm":
$page = new Admin();
$page->toHTML();
break;
}
}