You are here

public function LdapAuthorizationConsumerAbstract::createConsumer in Lightweight Directory Access Protocol (LDAP) 7.2

Same name and namespace in other branches
  1. 8.2 ldap_authorization/LdapAuthorizationConsumerAbstract.class.php \LdapAuthorizationConsumerAbstract::createConsumer()

Create authorization consumers.

Parameters

string (lowercase) $consumer_id:

array $consumer: as associative array with the following key/values 'value' => NULL | mixed consumer such as drupal role name, og group entity, etc. 'name' => name of consumer for UI, logging etc. 'map_to_string' => string mapped to in ldap authorization. mixed case string 'exists' => TRUE indicates consumer is known to exist, FALSE indicates consumer is known to not exist, NULL indicate consumer's existance not checked yet.

2 methods override LdapAuthorizationConsumerAbstract::createConsumer()
LdapAuthorizationConsumerDrupalRole::createConsumer in ldap_authorization/ldap_authorization_drupal_role/LdapAuthorizationConsumerRole.class.php
LdapAuthorizationConsumerOG::createConsumer in ldap_authorization/ldap_authorization_og/LdapAuthorizationConsumerOG.class.php
this function is not implemented for og, but could be if a use case for generating og groups and roles on the fly existed.

File

ldap_authorization/LdapAuthorizationConsumerAbstract.class.php, line 183
Abstract class to represent an ldap_authorization consumer behavior such as drupal_role, og_group, etc. each authorization comsumer will extend this class with its own class named LdapAuthorizationConsumer<consumer type> such as…

Class

LdapAuthorizationConsumerAbstract

Code

public function createConsumer($consumer_id, $consumer) {

  // Method must be overridden.
}