Yamek Hernandez Diaz
e03b6ca926
- Specifying Feed::createNewItem return data type for IDE completion.
(cherry picked from commit d4913ed)
10 years ago
drikc
a7a85a356e
Replace invalid xml utf-8 chars in tag contents including in attribute values.
Feed::utf8_for_xml() method used in the Feed::makeNode() method.
10 years ago
drikc
ad76998ca5
Replace invalid xml utf-8 chars in tag contents.
10 years ago
Michael Bemmerl
833f889796
Some fixes and additions in the DocBlock.
10 years ago
Michael Bemmerl
c51a9dad9f
Added method chaining for setPagination method.
10 years ago
Michael Bemmerl
9a65ed2117
Pagination is now done by internally invoking setAtomLink.
This also makes pagination work with RSS1 feeds. The method parameter for the feed URL itself was removed, because RFC 5005 only specifies the other four link relations. The URL to the feed can be set with the setSelfLink method.
10 years ago
Michael Bemmerl
6c8376a173
Documentation of new method parameter.
10 years ago
Michael Bemmerl
48f05ae2db
Support for attributes in channel elements. This is a possible fix for #18 .
10 years ago
Michael Bemmerl
e68b4f50df
Documentation and error handling of pagination methods.
10 years ago
Julian Bogdani
3b1af35a3d
URL can not be empty, or false
10 years ago
Julian Bogdani
546522df15
Added optional setPagination method that gives the possibility to add pagination links to feed pages (as described in http://tools.ietf.org/html/rfc5005#section-3 ).
10 years ago
Brandtley McMinn
f8e4a8d9d7
Added 'addCDATAEncoding' method
- 'addCDATAEncoding' accepts array of properties that are added to
'\Feed->CDATAEncoding' array
- provides more flexibility for folks that need finer control over the
way property values are rendered
10 years ago
Kristián Valentín
f0aebbb95e
fixes attribute's default value
RSS2 constant is defined under Feed class
11 years ago
Kristián Valentín
cdbd5951a0
fixes class name
classes that are not part of the class namespace should have qualified names
11 years ago
Kristián Valentín
048768bc02
applies PSR-1 and PSR-2 coding standards
11 years ago
Baptiste Fontaine
3c34fca97b
Added the ability to choose the value of the feed’s 'encoding' attribute.
11 years ago
Michael Bemmerl
30aa109e9a
Trap unparseable date strings.
11 years ago
Michael Bemmerl
2498670c5b
Tabified spaces
11 years ago
Michael Robinson
b86584270e
Add return $this to allow chaining
11 years ago
Michael Bemmerl
2ca6219f8f
Bugfix: Filter atom namespace prefixes also in feed items.
11 years ago
Michael Bemmerl
3769d1e75d
setDate method supports RSS2 feeds now. New method addGenerator for some advertising.
11 years ago
Michael Bemmerl
fecb20f288
Some updates to the setDate method, both to code and documentation.
Since this project requires PHP >= 5.3 anyway, the check for this version is not needed anymore in Item.php.
11 years ago
Michael Bemmerl
cb8e25269f
Some documentation fixes and additions for phpdoc
11 years ago
Michael Bemmerl
cc62d12c2e
Built-in support for author elements in RSS2 feeds.
This was previously already possible by using the custom addElement function.
11 years ago
Michael Bemmerl
f0bcb31422
Added a check for a restriction in the ATOM specification regarding the number of atom:link entites.
11 years ago
Michael Bemmerl
ee8d341505
Implemented function to add multiple custom link elements. This fixes #10 .
11 years ago
Michael Bemmerl
81e7520894
Implemented function to add custom XML namespaces. This fixes #9 .
The namespace prefix and name can be set by invoking the addNamespace method of the Feed class.
11 years ago
Michael Bemmerl
46df278a65
Added support for atom:link elements with relation=self. Fixes #5
See http://validator.w3.org/feed/docs/warning/MissingAtomSelfLink.html
11 years ago
Michael Bemmerl
6c1935f05f
Renamed the getContentType() method.
It's actually the MIME type which is returned and then used for the HTTP Content-Type header field.
12 years ago
Michael Bemmerl
1b1a3d0334
Fixed attribute string: Removed double whitespace between the key-value pairs.
12 years ago
Brennen Bearnes
7182691709
break out feed types; add printFeed(); namespace everything
A minimal set of changes to support PSR-0-style autoloading:
- rename base class to \FeedWriter\Feed and FeedItem to \FeedWriter\Item
- break types out into \FeedWriter\ATOM, \FeedWriter\RSS1, and
\FeedWriter\RSS2
- use class constants for versions
- make generateFeed() return a string rather than doing any IO itself
- add printFeed() to do output, if needed
My rationale for the last 2 items on that list is that our web framework
expects me to pass around strings, not do direct IO. I imagine needing
to grab the output and stash it in a variable or what-have-you is
a common use case, and it felt silly to have to wrap this in an
output buffer to accomplish that.
12 years ago
Michael Bemmerl
4926cd6a1b
Added wrapper classes for each feed type. Fixes #2 .
The FeedWriter class is now abstract, which means it is not possible to directly create an instance of it. Use the new wrapper classes in FeedTypes.php instead. This also obsoletes the constructor's version parameter for end-users.
12 years ago
Michael Bemmerl
f6356d2484
Removed __DIR__ constant for compatibility with PHP < 5.3
12 years ago
Michael Bemmerl
a45095963f
Some data integrity checks on public method addItem():
* Only accept instances of FeedItem
* Only accept instances of FeedItem with the same feed type
12 years ago
Michael Bemmerl
7d1ddfee53
Some small changes:
* Fixed spelling mistakes
* All \n's were replaced by PHP_EOL's
12 years ago
Phil Freo
a9bbe20a94
making feeditem require path absolute
13 years ago
Phil Freo
26918c7707
Using class_exists and require instead of require_once because of performance improvements in relationship to APC.
APC shouldn't have to open files more than once, but it does if you use require_once instead of require. More details here:
http://www.techyouruniverse.com/software/php-performance-tip-require-versus-require_once
13 years ago
Michael Bemmerl
e4f7aad8b7
Encode special chars in XML attributes, which would otherwise break the XML.
13 years ago
Michael Bemmerl
57fc7997d2
Removed the PHP closing braket in FeedItem.php. Otherwise the line ending would be printed when require'ing the FeedItem.php.
13 years ago
Michael Bemmerl
b0cfed933b
Removed superfluous whitespaces.
13 years ago
Michael Bemmerl
18c19ebc2a
Removed duplicated code
13 years ago
Michael Bemmerl
6210aac244
Some cosmetic fixes
13 years ago
Michael Bemmerl
635b6da956
Fixed error message formatting.
13 years ago
Michael Bemmerl
a49324e1d2
Sanitize user input which contains <![CDATA[ ... ]]>, which would otherwise break the XML.
13 years ago
Michael Bemmerl
9e5411ffb4
Reactivated conversion of special chars in non-CDATA tags.
This time using htmlspecialchars instead of htmlentities, because we need a encoding for XML, not for HTML.
13 years ago
Michael Bemmerl
6aa594ad6e
Included FeedItem.php in FeedWriter.php.
So this has now not to be done by the user. Another benefit of this change: The examples do work now. ;-)
14 years ago
Michael Bemmerl
6ebd01341e
Added copyright and license notices (GPL) to all files
14 years ago
Michael Bemmerl
294179725b
Fixed 'Content-Type' header field spelling.
14 years ago
Michael Bemmerl
e850856abc
Fixed some typo's and added comments.
14 years ago
Michael Bemmerl
81452997b7
Set the feed update date for ATOM validity.
(SVN import from repo. "www" @ revision 615, made by "Michi" on Oktober 31, 2010 (02:39:15))
14 years ago