eZ Publish  [4.2]
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)
 valueList ()

Static Public Member Functions

static create ($policyID, $identifier)
static createNew ($policyID, $identifier)
static definition ()
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 40 of file ezpolicylimitation.php.


Member Function Documentation

eZPolicyLimitation::allValues ( )

Definition at line 339 of file ezpolicylimitation.php.

eZPolicyLimitation::allValuesAsArrayWithNames ( )

Definition at line 223 of file ezpolicylimitation.php.

eZPolicyLimitation::allValuesAsString ( )

Definition at line 207 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 171 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 130 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 115 of file ezpolicylimitation.php.

Referenced by copy().

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:

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

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

eZPolicyLimitation::eZPolicyLimitation ( row)

Constructor

Definition at line 45 of file ezpolicylimitation.php.

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

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

Definition at line 148 of file ezpolicylimitation.php.

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

Definition at line 157 of file ezpolicylimitation.php.

Referenced by eZPolicyLimitationValue\removeByValue().

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

Get limitation array

Returns:
access limitation array

Definition at line 325 of file ezpolicylimitation.php.

eZPolicyLimitation::limitValue ( )

Definition at line 82 of file ezpolicylimitation.php.

eZPolicyLimitation::policy ( )

Get policy object of this policy limitation

Definition at line 90 of file ezpolicylimitation.php.

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

Definition at line 183 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 142 of file ezpolicylimitation.php.

eZPolicyLimitation::removeThis ( )
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 202 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.

Reimplemented from eZPersistentObject.

Definition at line 95 of file ezpolicylimitation.php.

eZPolicyLimitation::valueList ( )

Definition at line 350 of file ezpolicylimitation.php.


Member Data Documentation

eZPolicyLimitation::$LimitValue

Definition at line 411 of file ezpolicylimitation.php.


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