comparison vendor/zendframework/zend-feed/doc/book/consuming-atom-entry.md @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 # Consuming a Single Atom Entry
2
3 Single Atom `<entry>` elements are also valid by themselves. Usually the URL for
4 an entry is the feed's URL followed by `/<entryId>`, such as
5 `http://atom.example.com/feed/1`, using the example URL we used above. This
6 pattern may exist for some web services which use Atom as a container syntax.
7
8 If you read a single entry, you will have a `Zend\Feed\Reader\Entry\Atom` object.
9
10 ## Reading a Single-Entry Atom Feed
11
12 ```php
13 $entry = Zend\Feed\Reader\Reader::import('http://atom.example.com/feed/1');
14 echo 'Entry title: ' . $entry->getTitle();
15 ```
16
17 > ## Importing requires an HTTP client
18 >
19 > To import a feed, you will need to have an [HTTP client](zend.feed.http-clients)
20 > available.
21 >
22 > If you are not using zend-http, you will need to inject `Reader` with the HTTP
23 > client. See the [section on providing a client to Reader](http-clients.md#providing-a-client-to-reader).