lib
[ class tree: lib ] [ index: lib ] [ all elements ]

Class: cache

Source Location: /lib/cache.inc

Class Overview


This class contains all functions which are needed to manage the LDAP cache.


Variables

Methods



Class Details

[line 40]
This class contains all functions which are needed to manage the LDAP cache.



[ Top ]


Class Variables

$attributes =

[line 45]

This variable contains a list and their scope of attributes which should be cached


Type:   mixed


[ Top ]

$ldapcache =

[line 43]

This variable contains the cache


Type:   mixed


[ Top ]

$time =

[line 47]

This is the last timestamp on which the LDAP cache has been refreshed


Type:   mixed


[ Top ]



Class Methods


constructor cache [line 54]

cache cache( )

Constructor.



Tags:

return:  cache object


[ Top ]

method add_cache [line 64]

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 236]

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 218]

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 254]

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 93]

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 138]

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 173]

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 272]

array __sleep( )

Encrypts LDAP cache before saving to session file.



Tags:

return:  list of variables to save


[ Top ]

method __wakeup [line 281]

void __wakeup( )

Decrypts LDAP cache after loading from session file.



[ Top ]


Documentation generated on Wed, 15 Nov 2006 18:00:38 +0100 by phpDocumentor 1.2.3