lib

# Class: cache Source Location: /lib/cache.inc
### Class Overview
This class contains all functions which are needed to manage the LDAP cache. | ### Methods __construct add_cache findgroups getgid getgrnam get_cache in_cache refresh_cache __sleep __wakeup
### Class Details [line 42] This class contains all functions which are needed to manage the LDAP cache. [ Top ] ### Class Methods ### constructor __construct [line 56]
`cache __construct( )`
Constructor. #### Tags:
return: | cache object
[ Top ] ### method add_cache [line 66]
`void add_cache( array $attributes)`
This function adds attributes to the cache. #### Parameters:
array | $attributes | syntax: is array( scope1 => array ( attributes ), scope2 => array ( attributes ), ...)
[ Top ] ### method findgroups [line 242]
`array findgroups( )`
This function returns an array with all group names which were found in the LDAP directory. #### Tags:
return: | group names
[ Top ] ### method getgid [line 223]
`string getgid( string $groupname)`
This function will return the GID number to an existing group name (using the cache). #### Tags:
return: | GID number
#### Parameters:
string | $groupname | name of group
[ Top ] ### method getgrnam [line 260]
`group getgrnam( string $gidNumber)`
This function returns the group name to an existing gidNumber. #### Tags:
return: | name
#### Parameters:
string | $gidNumber | GID number
[ Top ] ### method get_cache [line 95]
`array get_cache( mixed $attributes, string $objectClass, mixed $scopelist)`
Queries the cache for a list of LDAP entries and their attributes. #### Tags:
return: | The found LDAP entries. Format: array(dn1 => array(uidnumber1), dn2 => array(uidnumber2), ... ) if $attributes is of type string or array(dn1 => array(uid => array(myuid), uidNumber => array(1234)), ... ) if $attributes is an array
#### Parameters:
mixed | $attributes | One (string) or many (array) attribute names.
string | $objectClass | The resulting entries need to contain this object class.
mixed | $scopelist | the account type(s) as string or array, all scopes if NULL given
[ Top ] ### method in_cache [line 140]
`void in_cache( string $value, string $attribute, mixed $scopelist)`
This function returns the DN if an LDAP entry with $attribute=$value is found. #### Parameters:
string | $value | is the searched value of the attribute $attribute
string | $attribute | name of the LDAP attribute
mixed | $scopelist | the account type(s) as string or array, all scopes if NULL given
[ Top ] ### method refresh_cache [line 175]
`void refresh_cache( [boolean $rebuild = false])`
This function refreshes the cache. #### Parameters:
boolean | $rebuild | forces a refresh if set to true
[ Top ] ### method __sleep [line 278]
`array __sleep( )`
Encrypts LDAP cache before saving to session file. #### Tags:
return: | list of variables to save
[ Top ] ### method __wakeup [line 287]
`void __wakeup( )`
Decrypts LDAP cache after loading from session file. [ Top ] Documentation generated on Tue, 07 Apr 2009 20:35:00 +0200 by phpDocumentor 1.4.1