Home » Docs » FeedWriter » Class Constructor

Class Constructor

Instantiate an object from the FeedWriter class.
void __construct( string $title , string $description , string $link , [ integer $indent = 6 ] , [ boolean $useCDATA = false ] , [ string $encode_as = null ] , [ boolean $enable_validation = true ] ) Create a new FeedWriter class object, including some basic information required to control the input/output process and get the feed started.
string $title
A string consisting of the feed title.
string $description
A string containing a description of the feed.
string $link
A string containing a the feed link, usually a link back to the blog / website.
[ integer $indent ]
An integer value representing the level of indent to apply to the XMLWriter when outputting the feed XML.
[ boolean $useCDATA ]
true/false indicating if text elements should be outputted as CDATA.
[ string $encode_as ]
A string containing the character encoding to be applied to the XML document / feed output.
[ boolean $enable_validation ]
true/false to indicate if the feed data should be validated against the corresponding FeedConstruct class for the specified output format. This will assist with building a feed that is valid in all supported output formats
Return Values
Instantiate new object from the FeedWriter class, passing the title, description, link and some other configuration information.
$phpFeedWriter = new FeedWriter(
	'Php FeedWriter Class v3.0', 	//Feed Title
	'Generate Atom 1.0, RSS 2.0, RSS 1.0, RSS 0.92, RSS 0.91 compatible Feed from website or database content', //Feed Description
	'http://phpfeedwriter.webmasterhub.net', //Feed Link
	6, //indent
	true, //Use CDATA
	null, //encoding
	true //enable validation
Related Resources

Comments (0)

No comments yet

Leave a Reply

You must be logged in to post a comment.
  • Php FeedWriter (c) Copyright 2011 Daniel Soutter. Php FeedWriter and the information on this site has been designed to benefit website developers, owners and users, but may contain errors and is provided as is, with no warranty. Terms.