示例#1
0
 private static function addAccessControlRule($policyId)
 {
     $rule = new kRule();
     $action = new kAccessControlDrmPolicyAction();
     $action->setPolicyId($policyId);
     $rule->setActions(array($action));
     return $rule;
 }
 private static function addAccessControlRule($priviledge, $policyId)
 {
     $rule = new kRule();
     $condition = new kAuthenticatedCondition();
     $condition->setPrivileges(array($priviledge));
     $action = new kAccessControlDrmPolicyAction();
     $action->setPolicyId($policyId);
     $rule->setConditions(array($condition));
     $rule->setActions(array($action));
     return $rule;
 }