eZ Publish  [4.2]
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 ()
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 41 of file ezrssimport.php.


Member Function Documentation

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

Definition at line 496 of file ezrssimport.php.

Referenced by fieldMap().

eZRSSImport::classAttributes ( )

Definition at line 263 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 155 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:

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 ezrssimport.php.

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

eZRSSImport::destinationPath ( )

Definition at line 276 of file ezrssimport.php.

eZRSSImport::eZRSSImport ( row)

Initializes a new RSSImport.

Definition at line 49 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 204 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 233 of file ezrssimport.php.

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

Fetches complete list of RSS Imports.

Definition at line 217 of file ezrssimport.php.

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

Definition at line 422 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 314 of file ezrssimport.php.

eZRSSImport::importDescription ( )

Get import description

Returns:
import description

Definition at line 486 of file ezrssimport.php.

eZRSSImport::modifier ( )

Definition at line 254 of file ezrssimport.php.

static eZRSSImport::objectAttributeList ( ) [static]

Object attribute list

Definition at line 354 of file ezrssimport.php.

eZRSSImport::objectOwner ( )

Definition at line 245 of file ezrssimport.php.

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

Recursivly build field map

Parameters:
array

Definition at line 449 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 369 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 476 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 188 of file ezrssimport.php.


Member Data Documentation

Definition at line 44 of file ezrssimport.php.

Definition at line 43 of file ezrssimport.php.


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