eZ Publish  [trunk]
eZRSSExport Class Reference

Handles RSS Export in eZ Publish. More...

+ Inheritance diagram for eZRSSExport:
+ Collaboration diagram for eZRSSExport:

List of all members.

Public Member Functions

 eZRSSExport ($row)
 fetchItems ($id=false, $status=eZRSSExport::STATUS_VALID)
 fetchRSS1_0 ()
 Get a RSS xml document based on the RSS 1.0 standard based on the RSS Export settings defined by this object.
 fetchRSS2_0 ()
 Get a RSS xml document based on the RSS 2.0 standard based on the RSS Export settings defined by this object.
 generateFeed ($type)
 Generates an RSS feed document with type $type and returns it as a string.
 getObjectListFilter ()
 imageNode ()
 imagePath ()
 itemList ()
 modifier ()
 removeThis ()
 rssXml ()
 Generates an RSS feed document based on the rss_version attribute.
 rssXmlContent ()
 Generates an RSS feed document based on the rss_version attribute.
 store ($storeAsValid=false)

Static Public Member Functions

static create ($user_id)
static definition ()
 Returns the definition for the object, the default implementation is to return an empty array.
static fetch ($id, $asObject=true, $status=eZRSSExport::STATUS_VALID)
static fetchByName ($access_url, $asObject=true)
static fetchList ($asObject=true)

Public Attributes

const STATUS_DRAFT = 0
const STATUS_VALID = 1

Private Member Functions

 fetchImageURL ()
 urlEncodePath ($url)

Detailed Description

Handles RSS Export in eZ Publish.

RSSExport is used to create RSS feeds from published content. See kernel/rss for more files.

Definition at line 18 of file ezrssexport.php.


Member Function Documentation

static eZRSSExport::create ( user_id) [static]

Creates a new RSS Export

Parameters:
UserID
Returns:
the URL alias object

Definition at line 128 of file ezrssexport.php.

Referenced by eZContentOperationCollection\createFeedForNode(), and eZSiteInstaller\setRSSExport().

static eZRSSExport::definition ( ) [static]

Returns the definition for the object, the default implementation is to return an empty array.

It's upto each inheriting class to return a proper definition array.

The definition array is an associative array consists of these keys:

  • fields: an associative array of fields which defines which database field (the key) is to fetched and how they map to object member variables (the value).
  • keys: an array of fields which is used for uniquely identifying the object in the table.
  • function_attributes: an associative array of attributes which maps to member functions, used for fetching data with functions.
  • set_functions: an associative array of attributes which maps to member functions, used for setting data with functions.
  • increment_key: the field which is incremented on table inserts.
  • class_name: the classname which is used for instantiating new objecs when fetching from the database.
  • sort: an associative array which defines the default sorting of lists, the key is the table field while the value is the sorting method which is either 'asc' or 'desc'.
  • name: the name of the database table

Example: public static function definition() { return array( "fields" => array( "id" => "ID", "version" => "Version", "name" => "Name" ), "keys" => array( "id", "version" ), "function_attributes" => array( "current" => "currentVersion", "class_name" => "className" ), "increment_key" => "id", "class_name" => "eZContentClass", "sort" => array( "id" => "asc" ), "name" => "ezcontentclass" ); }

Returns:
array

Reimplemented from eZPersistentObject.

Definition at line 31 of file ezrssexport.php.

Referenced by eZRSSFunctionCollection\exportByNode(), fetch(), fetchByName(), fetchList(), and eZContentOperationCollection\removeFeedForNode().

Initializes a new RSSExport.

Definition at line 26 of file ezrssexport.php.

Referenced by create().

static eZRSSExport::fetch ( id,
asObject = true,
status = eZRSSExport::STATUS_VALID 
) [static]

Fetches the RSS Export by ID.

Parameters:
RSSExport ID

Definition at line 206 of file ezrssexport.php.

Referenced by generateFeed(), imageNode(), imagePath(), modifier(), and eZRSSEditFunction\storeRSSExport().

static eZRSSExport::fetchByName ( access_url,
asObject = true 
) [static]

Fetches the RSS Export by feed access url and is active.

Parameters:
RSSExport access url

Definition at line 221 of file ezrssexport.php.

Fetch Image from current ezrss export object. If non exist, or invalid, return false

Returns:
valid image url

Definition at line 1116 of file ezrssexport.php.

Referenced by fetchRSS1_0(), fetchRSS2_0(), and generateFeed().

Fetches RSS Items related to this RSS Export. The RSS Export Items contain information about which nodes to export information from

Parameters:
RSSExportID (optional). Uses current RSSExport's ID as default
Returns:
RSSExportItem list. null if no RSS Export items found

Definition at line 373 of file ezrssexport.php.

Referenced by itemList(), and removeThis().

static eZRSSExport::fetchList ( asObject = true) [static]

Fetches complete list of RSS Exports.

Definition at line 235 of file ezrssexport.php.

Get a RSS xml document based on the RSS 1.0 standard based on the RSS Export settings defined by this object.

Deprecated:
since 4.2
Returns:
DomDocument RSS 1.0 XML document

Definition at line 632 of file ezrssexport.php.

Referenced by rssXml().

Get a RSS xml document based on the RSS 2.0 standard based on the RSS Export settings defined by this object.

Deprecated:
since 4.2
Returns:
string RSS 2.0 XML document

Definition at line 417 of file ezrssexport.php.

Referenced by rssXml().

Generates an RSS feed document with type $type and returns it as a string.

It uses the Feed component from eZ Components.

Supported types: 'rss1', 'rss2', 'atom'.

Since:
4.2
Parameters:
string$typeOne of 'rss1', 'rss2' and 'atom'
Returns:
string XML document as a string

Definition at line 821 of file ezrssexport.php.

Referenced by rssXmlContent().

Definition at line 395 of file ezrssexport.php.

Referenced by fetchRSS1_0(), fetchRSS2_0(), and generateFeed().

Definition at line 247 of file ezrssexport.php.

Definition at line 256 of file ezrssexport.php.

Definition at line 242 of file ezrssexport.php.

Definition at line 283 of file ezrssexport.php.

Remove the RSS Export.

Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 186 of file ezrssexport.php.

Generates an RSS feed document based on the rss_version attribute.

Deprecated:
since 4.2
Returns:
DomDocument XML document

Definition at line 298 of file ezrssexport.php.

Generates an RSS feed document based on the rss_version attribute.

It uses the Feed component from eZ Components.

Supported types: 'rss1', 'rss2', 'atom'.

Since:
4.2
Returns:
string XML document as a string

Definition at line 331 of file ezrssexport.php.

eZRSSExport::store ( storeAsValid = false)

Store Object to database

Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Reimplemented from eZPersistentObject.

Definition at line 154 of file ezrssexport.php.

eZRSSExport::urlEncodePath ( url) [private]

Performs rawurlencode() on the path part of the URL. The rest is not touched.

Returns:
partially encoded url

Definition at line 1156 of file ezrssexport.php.

Referenced by fetchRSS1_0(), fetchRSS2_0(), and generateFeed().


Member Data Documentation


The documentation for this class was generated from the following file: