eZ Publish  [trunk]
eZRSSImport Class Reference

Handles RSS Import in eZ Publish. More...

+ Inheritance diagram for eZRSSImport:
+ Collaboration diagram for eZRSSImport:

List of all members.

Public Member Functions

 classAttributes ()
 destinationPath ()
 eZRSSImport ($row)
 importDescription ()
 modifier ()
 objectOwner ()
 setImportDescription ($definition=array())
 store ($fieldFilters=null)

Static Public Member Functions

static arrayMergeRecursive ($arr1, $arr2)
static create ($userID=false)
static definition ()
 Returns the definition for the object, the default implementation is to return an empty array.
static fetch ($id, $asObject=true, $status=eZRSSImport::STATUS_VALID)
static fetchActiveList ($asObject=true)
static fetchList ($asObject=true, $status=eZRSSImport::STATUS_VALID)
static fieldMap ($version= '2.0')
static getRSSVersion ($url)
static objectAttributeList ()
static recursiveFieldMap ($definitionArray, $globalKey, $value, &$returnArray, $count)
static rssFieldDefinition ($version= '2.0')

Public Attributes

const STATUS_DRAFT = 0
const STATUS_VALID = 1

Detailed Description

Handles RSS Import in eZ Publish.

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

Definition at line 18 of file ezrssimport.php.


Member Function Documentation

static eZRSSImport::arrayMergeRecursive ( arr1,
arr2 
) [static]

Definition at line 473 of file ezrssimport.php.

Referenced by fieldMap().

Definition at line 240 of file ezrssimport.php.

static eZRSSImport::create ( userID = false) [static]

Creates a new RSS Import

Parameters:
UserID
Returns:
the new RSS Import object

Definition at line 132 of file ezrssimport.php.

static eZRSSImport::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 ezrssimport.php.

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

Definition at line 253 of file ezrssimport.php.

Initializes a new RSSImport.

Definition at line 26 of file ezrssimport.php.

Referenced by create().

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

Fetches the RSS Import by ID.

Parameters:
RSSImport ID

Definition at line 181 of file ezrssimport.php.

Referenced by classAttributes(), destinationPath(), modifier(), and objectOwner().

static eZRSSImport::fetchActiveList ( asObject = true) [static]

Fetches complete list of active RSS Imports.

Definition at line 210 of file ezrssimport.php.

static eZRSSImport::fetchList ( asObject = true,
status = eZRSSImport::STATUS_VALID 
) [static]

Fetches complete list of RSS Imports.

Definition at line 194 of file ezrssimport.php.

static eZRSSImport::fieldMap ( version = '2.0') [static]
Parameters:
RSSversion
Returns:
Ordered array of field definitions

Definition at line 399 of file ezrssimport.php.

static eZRSSImport::getRSSVersion ( url) [static]

Analize RSS import, and get RSS version number

Parameters:
URL
Returns:
RSS version number, false if invalid URL

Definition at line 291 of file ezrssimport.php.

Get import description

Returns:
import description

Definition at line 463 of file ezrssimport.php.

Definition at line 231 of file ezrssimport.php.

static eZRSSImport::objectAttributeList ( ) [static]

Object attribute list

Definition at line 331 of file ezrssimport.php.

Definition at line 222 of file ezrssimport.php.

static eZRSSImport::recursiveFieldMap ( definitionArray,
globalKey,
value,
&$  returnArray,
count 
) [static]

Recursivly build field map

Parameters:
array

Definition at line 426 of file ezrssimport.php.

Referenced by fieldMap().

static eZRSSImport::rssFieldDefinition ( version = '2.0') [static]

Return default RSS field definition

Parameters:
RSSversion
Returns:
RSS field definition array.

Definition at line 346 of file ezrssimport.php.

Referenced by fieldMap().

eZRSSImport::setImportDescription ( definition = array())

Set import description

Import definition must be set as an multidimentional array.

Example : array( 'rss_version' => <version>, 'object_attributes' => array( ... ), 'class_attributes' => array( <content class="" attribute="" id>=""> => <RSS import="" field>="">, ... ) )

Definition at line 453 of file ezrssimport.php.

eZRSSImport::store ( fieldFilters = null)

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 165 of file ezrssimport.php.


Member Data Documentation

Definition at line 21 of file ezrssimport.php.

Referenced by storeRSSImport().

Definition at line 20 of file ezrssimport.php.

Referenced by storeRSSImport().


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