Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
PolicySet Class Reference
Inheritance diagram for PolicySet:
JournalPolicy PKPSiteAccessPolicy OjsJournalAccessPolicy OjsSubmissionAccessPolicy

Public Member Functions

 addPolicy (&$policyOrPolicySet, $addToTop=false)
 
 getCombiningAlgorithm ()
 
 getEffectIfNoPolicyApplies ()
 
getPolicies ()
 
 PolicySet ($combiningAlgorithm=COMBINING_DENY_OVERRIDES)
 
 setEffectIfNoPolicyApplies ($effectIfNoPolicyApplies)
 

Detailed Description

An ordered list of policies. Policy sets can be added to decision managers like policies. The decision manager will evaluate the contained policies in the order they were added.

NB: PolicySets can be nested.

Definition at line 26 of file PolicySet.inc.php.

Member Function Documentation

PolicySet::addPolicy ( $policyOrPolicySet,
  $addToTop = false 
)

Add a policy or a nested policy set.

Parameters
$policyOrPolicySetAuthorizationPolicy|PolicySet
$addToTopboolean whether to insert the new policy to the top of the list.

Definition at line 54 of file PolicySet.inc.php.

Referenced by JournalPolicy\JournalPolicy(), OjsJournalAccessPolicy\OjsJournalAccessPolicy(), OjsSubmissionAccessPolicy\OjsSubmissionAccessPolicy(), and PKPSiteAccessPolicy\PKPSiteAccessPolicy().

PolicySet::getCombiningAlgorithm ( )

Return the combining algorithm

Returns
integer

Definition at line 75 of file PolicySet.inc.php.

PolicySet::getEffectIfNoPolicyApplies ( )

Get the default effect if none of the policies in the set applies

Returns
integer

Definition at line 94 of file PolicySet.inc.php.

& PolicySet::getPolicies ( )

Get all policies within this policy set.

Returns
array a list of AuthorizationPolicy or PolicySet objects.

Definition at line 67 of file PolicySet.inc.php.

PolicySet::PolicySet (   $combiningAlgorithm = COMBINING_DENY_OVERRIDES)

Constructor

Parameters
$combiningAlgorithmint COMBINING_...

Definition at line 41 of file PolicySet.inc.php.

Referenced by OjsJournalAccessPolicy\OjsJournalAccessPolicy(), OjsSubmissionAccessPolicy\OjsSubmissionAccessPolicy(), and PKPSiteAccessPolicy\PKPSiteAccessPolicy().

PolicySet::setEffectIfNoPolicyApplies (   $effectIfNoPolicyApplies)

Set the default effect if none of the policies in the set applies

Parameters
$effectIfNoPolicyAppliesinteger

Definition at line 83 of file PolicySet.inc.php.


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