eZ Publish  [trunk]
eZPolicyLimitation Class Reference

Defines a limitation for a policy in the permission system. More...

+ Inheritance diagram for eZPolicyLimitation:
+ Collaboration diagram for eZPolicyLimitation:

List of all members.

Public Member Functions

 allValues ()
 allValuesAsArrayWithNames ()
 allValuesAsString ()
 copy ($policyID)
 eZPolicyLimitation ($row)
 limitArray ()
 limitValue ()
 policy ()
 removeThis ()
 setAttribute ($attr, $val)
 Sets the attribute $attr to the value $val.
 valueList ()

Static Public Member Functions

static create ($policyID, $identifier)
static createNew ($policyID, $identifier)
static definition ()
 Returns the definition for the object, the default implementation is to return an empty array.
static fetchByIdentifier ($policyID, $identifier, $asObject=true)
static fetchByPolicyID ($policyID, $asObject=true)
static findByType ($type, $value, $asObject=true, $useLike=true)
static removeByID ($id)
static removeSelected ($ID)

Public Attributes

 $LimitValue

Detailed Description

Defines a limitation for a policy in the permission system.

Definition at line 17 of file ezpolicylimitation.php.


Member Function Documentation

Definition at line 312 of file ezpolicylimitation.php.

eZPolicyLimitation::copy ( policyID)
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 148 of file ezpolicylimitation.php.

static eZPolicyLimitation::create ( policyID,
identifier 
) [static]

Create a new policy limitation for the policy $policyID with the identifier $identifier.

Note:
The limitation is not stored.

Definition at line 107 of file ezpolicylimitation.php.

static eZPolicyLimitation::createNew ( policyID,
identifier 
) [static]
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 92 of file ezpolicylimitation.php.

Referenced by copy(), and processDropdownLimitations().

static eZPolicyLimitation::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 28 of file ezpolicylimitation.php.

Referenced by fetchByIdentifier(), fetchByPolicyID(), eZPolicy\limitationList(), and removeSelected().

Constructor

Definition at line 22 of file ezpolicylimitation.php.

Referenced by create(), createNew(), and findByType().

static eZPolicyLimitation::fetchByIdentifier ( policyID,
identifier,
asObject = true 
) [static]

Definition at line 125 of file ezpolicylimitation.php.

static eZPolicyLimitation::fetchByPolicyID ( policyID,
asObject = true 
) [static]
static eZPolicyLimitation::findByType ( type,
value,
asObject = true,
useLike = true 
) [static]

Get limitation array

Returns:
access limitation array

Definition at line 298 of file ezpolicylimitation.php.

Definition at line 59 of file ezpolicylimitation.php.

Get policy object of this policy limitation

Definition at line 67 of file ezpolicylimitation.php.

static eZPolicyLimitation::removeByID ( id) [static]
See also:
removeThis

Definition at line 160 of file ezpolicylimitation.php.

Referenced by removeThis().

static eZPolicyLimitation::removeSelected ( ID) [static]
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 119 of file ezpolicylimitation.php.

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 179 of file ezpolicylimitation.php.

eZPolicyLimitation::setAttribute ( attr,
val 
)

Sets the attribute $attr to the value $val.

The attribute must be present in the objects definition fields or set functions.

Parameters:
string$attr
mixed$val
Returns:
void

Reimplemented from eZPersistentObject.

Definition at line 72 of file ezpolicylimitation.php.

Definition at line 323 of file ezpolicylimitation.php.


Member Data Documentation

eZPolicyLimitation::$LimitValue

Definition at line 384 of file ezpolicylimitation.php.


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