我正在努力思考如何使用 Zend_Feed_Rss。根据文档,要获取频道的链接,您可以使用 $channel->link() 方法访问它。但是当我这样做时,我得到了一个数组,而我想要的实际东西的链接被埋在数组的第二个项目中。我究竟做错了什么?文档不是很有帮助;似乎它希望您只是神奇地弄清楚如何使用这种特定方法。另外,我试过用谷歌搜索其他资源,但无济于事,所以我真的需要一些帮助。
这是我最终得到的数组:
Array
(
[0] => DOMElement Object
(
[tagName] => atom:link
[schemaTypeInfo] =>
[nodeName] => atom:link
[nodeValue] =>
[nodeType] => 1
[parentNode] => (object value omitted)
[childNodes] => (object value omitted)
[firstChild] =>
[lastChild] =>
[previousSibling] => (object value omitted)
[nextSibling] => (object value omitted)
[attributes] => (object value omitted)
[ownerDocument] => (object value omitted)
[namespaceURI] => http://www.w3.org/2005/Atom
[prefix] => atom
[localName] => link
[baseURI] => /path/to/application
[textContent] =>
)
[1] => DOMElement Object
(
[tagName] => link
[schemaTypeInfo] =>
[nodeName] => link
[nodeValue] => http://whatactuallywant.wordpress.com
[nodeType] => 1
[parentNode] => (object value omitted)
[childNodes] => (object value omitted)
[firstChild] => (object value omitted)
[lastChild] => (object value omitted)
[previousSibling] => (object value omitted)
[nextSibling] => (object value omitted)
[attributes] => (object value omitted)
[ownerDocument] => (object value omitted)
[namespaceURI] =>
[prefix] =>
[localName] => link
[baseURI] => /path/to/applicaiton
[textContent] => http://whatactuallywant.wordpress.com
)
[2] => DOMElement Object
(
[tagName] => atom:link
[schemaTypeInfo] =>
[nodeName] => atom:link
[nodeValue] =>
[nodeType] => 1
[parentNode] => (object value omitted)
[childNodes] => (object value omitted)
[firstChild] =>
[lastChild] =>
[previousSibling] => (object value omitted)
[nextSibling] => (object value omitted)
[attributes] => (object value omitted)
[ownerDocument] => (object value omitted)
[namespaceURI] => http://www.w3.org/2005/Atom
[prefix] => atom
[localName] => link
[baseURI] => /path/to/application
[textContent] =>
)
...
)