Quantcast
Channel: How do I customise my Atom feed? - Stack Overflow
Viewing all articles
Browse latest Browse all 3

How do I customise my Atom feed?

$
0
0

I am creating a new module for my ZF2 application. I need to expose some data as an Atom feed. The spec I have been given looks something like this.

<entry>
    <source>MySource</source>
    <title>MyTitle</title>
    <link href="http://mylink:1" rel="self" />
    <updated>2014-06-17T07:56:03.1696831Z</updated>
    <content type="MyContentType">
        <customerids xmlns="">MAGENTO:1</customerids>
        <customerids xmlns="">CRM:123</customerids>
        <customerids xmlns="">OTHER:999</customerids>
        <passwordalgorithm xmlns="">SHA-2</passwordalgorithm>
        <passwordsalt xmlns="">QxLUF1bgIAdeQX</passwordsalt>
    </content>
</entry>

I can make a feed quite easily utilising Zend\Feed\Writer\Feed

What I can't work out is how to set the type on the content element and how to add my additional elements to the content element. All I can get is a type of XHTML with string content.

I'm also having trouble working out how to add the "source" element to the entry.

I really do not want to go down the road of manually making this feed using a view.

Any help greatly appreciated.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images