【发布时间】:2010-10-13 04:04:55
【问题描述】:
我已经设置了 RSS 助手(使用 CakePHP 1.3.4)并且一切正常 - 我可以通过 /news/feed.rss 访问我的提要 - 如 http://book.cakephp.org/view/1461/Creating-an-RSS-feed-with-the-RssHelper 中的示例
但我希望能够在 sudo 中有条件地执行此操作,例如:
if (!empty($var)) {
switch ($var) {
case one :
$xml = $this->method->find('$var conditions...');
... use RSS Helper to serve results as XML.
case two :
$xml = $this->method->find('other $var conditions...');
... use RSS Helper to serve results as XML.
}
}
我可以在这种情况下使用 RSS Helper 吗?我使用什么调用/语法?
【问题讨论】:
标签: cakephp cakephp-1.3