eZ Publish  [4.2]
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 ()
 fetchRSS2_0 ()
 getObjectListFilter ()
 imageNode ()
 imagePath ()
 itemList ()
 modifier ()
 removeThis ()
 rssXml ()
 store ($storeAsValid=false)

Static Public Member Functions

static create ($user_id)
static definition ()
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 41 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 150 of file ezrssexport.php.

Referenced by 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:

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" );
}

Reimplemented from eZPersistentObject.

Definition at line 54 of file ezrssexport.php.

Referenced by fetch(), fetchByName(), and fetchList().

eZRSSExport::eZRSSExport ( row)

Initializes a new RSSExport.

Definition at line 49 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 228 of file ezrssexport.php.

Referenced by imageNode(), imagePath(), and modifier().

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 243 of file ezrssexport.php.

eZRSSExport::fetchImageURL ( ) [private]

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

Returns:
valid image url

Definition at line 800 of file ezrssexport.php.

Referenced by fetchRSS1_0(), and fetchRSS2_0().

eZRSSExport::fetchItems ( id = false,
status = eZRSSExport::STATUS_VALID 
)

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 344 of file ezrssexport.php.

Referenced by itemList(), and removeThis().

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

Fetches complete list of RSS Exports.

Definition at line 257 of file ezrssexport.php.

eZRSSExport::fetchRSS1_0 ( )

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

Returns:
RSS 1.0 XML document

Definition at line 610 of file ezrssexport.php.

Referenced by rssXml().

eZRSSExport::fetchRSS2_0 ( )

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

Returns:
RSS 2.0 XML document

Definition at line 387 of file ezrssexport.php.

Referenced by rssXml().

eZRSSExport::getObjectListFilter ( )

Definition at line 366 of file ezrssexport.php.

Referenced by fetchRSS1_0(), and fetchRSS2_0().

eZRSSExport::imageNode ( )

Definition at line 269 of file ezrssexport.php.

eZRSSExport::imagePath ( )

Definition at line 278 of file ezrssexport.php.

eZRSSExport::itemList ( )

Definition at line 264 of file ezrssexport.php.

eZRSSExport::modifier ( )

Definition at line 305 of file ezrssexport.php.

eZRSSExport::removeThis ( )

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 208 of file ezrssexport.php.

eZRSSExport::rssXml ( )

Definition at line 314 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 176 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 840 of file ezrssexport.php.

Referenced by fetchRSS1_0(), and fetchRSS2_0().


Member Data Documentation

Definition at line 44 of file ezrssexport.php.

Definition at line 43 of file ezrssexport.php.

Referenced by store().


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