LDAPAccountManager/lam-web/developers/phpdoc/lib/cache.html

535 lines
16 KiB
HTML
Raw Normal View History

2006-11-15 17:12:15 +00:00
<html>
<head>
<title>Docs For Class cache</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
<tr>
<td class="header_top">lib</td>
</tr>
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
<tr>
<td class="header_menu">
[ <a href="../classtrees_lib.html" class="menu">class tree: lib</a> ]
[ <a href="../elementindex_lib.html" class="menu">index: lib</a> ]
[ <a href="../elementindex.html" class="menu">all elements</a> ]
</td>
</tr>
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="200" class="menu">
<div id="ric">
<p><a href="../ric_README.html">README</a></p>
<p><a href="../ric_INSTALL.html">INSTALL</a></p>
</div>
<b>Packages:</b><br />
<a href="../li_configuration.html">configuration</a><br />
<a href="../li_Help.html">Help</a><br />
<a href="../li_LDAP.html">LDAP</a><br />
<a href="../li_lib.html">lib</a><br />
<a href="../li_lists.html">lists</a><br />
<a href="../li_main.html">main</a><br />
<a href="../li_modules.html">modules</a><br />
<a href="../li_PDF.html">PDF</a><br />
<a href="../li_profiles.html">profiles</a><br />
<a href="../li_selfService.html">selfService</a><br />
<a href="../li_tests.html">tests</a><br />
<a href="../li_tools.html">tools</a><br />
<a href="../li_types.html">types</a><br />
<br /><br />
<b>Files:</b><br />
<div class="package">
<a href="../lib/_lib_account_inc.html"> account.inc
</a><br>
<a href="../lib/_lib_cache_inc.html"> cache.inc
</a><br>
<a href="../lib/_lib_schema_inc.html"> schema.inc
</a><br>
<a href="../lib/_lib_security_inc.html"> security.inc
</a><br>
<a href="../lib/_lib_status_inc.html"> status.inc
</a><br>
</div><br />
<b>Classes:</b><br />
<div class="package">
<a href="../lib/AttributeType.html">AttributeType</a><br />
<a href="../lib/cache.html">cache</a><br />
<a href="../lib/MatchingRule.html">MatchingRule</a><br />
<a href="../lib/MatchingRuleUse.html">MatchingRuleUse</a><br />
<a href="../lib/ObjectClass.html">ObjectClass</a><br />
<a href="../lib/ObjectClassAttribute.html">ObjectClassAttribute</a><br />
<a href="../lib/SchemaItem.html">SchemaItem</a><br />
<a href="../lib/Syntax.html">Syntax</a><br />
</div>
</td>
<td>
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
<h1>Class: cache</h1>
Source Location: /lib/cache.inc<br /><br />
<table width="100%" border="0">
<tr><td valign="top">
<h3><a href="#class_details">Class Overview</a></h3>
<pre></pre><br />
<div class="description">This class contains all functions which are needed to manage the LDAP cache.</div><br /><br />
</td>
<td valign="top">
<h3><a href="#class_vars">Variables</a></h3>
<ul>
<li><a href="../lib/cache.html#var$attributes">$attributes</a></li>
<li><a href="../lib/cache.html#var$ldapcache">$ldapcache</a></li>
<li><a href="../lib/cache.html#var$time">$time</a></li>
</ul>
</td>
<td valign="top">
<h3><a href="#class_methods">Methods</a></h3>
<ul>
<li><a href="../lib/cache.html#methodcache">cache</a></li>
<li><a href="../lib/cache.html#methodadd_cache">add_cache</a></li>
<li><a href="../lib/cache.html#methodfindgroups">findgroups</a></li>
<li><a href="../lib/cache.html#methodgetgid">getgid</a></li>
<li><a href="../lib/cache.html#methodgetgrnam">getgrnam</a></li>
<li><a href="../lib/cache.html#methodget_cache">get_cache</a></li>
<li><a href="../lib/cache.html#methodin_cache">in_cache</a></li>
<li><a href="../lib/cache.html#methodrefresh_cache">refresh_cache</a></li>
<li><a href="../lib/cache.html#method__sleep">__sleep</a></li>
<li><a href="../lib/cache.html#method__wakeup">__wakeup</a></li>
</ul>
</td>
</tr></table>
<hr />
<table width="100%" border="0"><tr>
</tr></table>
<hr />
<a name="class_details"></a>
<h3>Class Details</h3>
<div class="tags">
[line 40]<br />
This class contains all functions which are needed to manage the LDAP cache.<br /><br /></div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />
<hr />
<a name="class_vars"></a>
<h3>Class Variables</h3>
<div class="tags">
<a name="var$attributes"></a>
<p></p>
<h4>$attributes = <span class="value"></span></h4>
<p>[line 45]</p>
This variable contains a list and their scope of attributes which should be cached<br /><br />
<br />
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>Type:</b>&nbsp;&nbsp;</td>
<td>mixed</td>
</tr>
</table>
</div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />
<a name="var$ldapcache"></a>
<p></p>
<h4>$ldapcache = <span class="value"></span></h4>
<p>[line 43]</p>
This variable contains the cache<br /><br />
<br />
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>Type:</b>&nbsp;&nbsp;</td>
<td>mixed</td>
</tr>
</table>
</div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />
<a name="var$time"></a>
<p></p>
<h4>$time = <span class="value"></span></h4>
<p>[line 47]</p>
This is the last timestamp on which the LDAP cache has been refreshed<br /><br />
<br />
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>Type:</b>&nbsp;&nbsp;</td>
<td>mixed</td>
</tr>
</table>
</div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />
</div><br />
<hr />
<a name="class_methods"></a>
<h3>Class Methods</h3>
<div class="tags">
<hr />
<a name="methodcache"></a>
<h3>constructor cache <span class="smalllinenumber">[line 54]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code><a href="../lib/cache.html">cache</a> cache(
)</code>
</td></tr></table>
</td></tr></table><br />
Constructor.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>cache object</td>
</tr>
</table>
</div>
<br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodadd_cache"></a>
<h3>method add_cache <span class="smalllinenumber">[line 64]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void add_cache(
array
$attributes)</code>
</td></tr></table>
</td></tr></table><br />
This function adds attributes to the cache.<br /><br /><br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">array&nbsp;&nbsp;</td>
<td><b>$attributes</b>&nbsp;&nbsp;</td>
<td>syntax: is array( scope1 =&gt; array ( attributes ), scope2 =&gt; array ( attributes ), ...)</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodfindgroups"></a>
<h3>method findgroups <span class="smalllinenumber">[line 236]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>array findgroups(
)</code>
</td></tr></table>
</td></tr></table><br />
This function returns an array with all group names which were found in the LDAP directory.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>group names</td>
</tr>
</table>
</div>
<br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodgetgid"></a>
<h3>method getgid <span class="smalllinenumber">[line 218]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>string getgid(
string
$groupname)</code>
</td></tr></table>
</td></tr></table><br />
This function will return the GID number to an existing group name (using the cache).<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>GID number</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$groupname</b>&nbsp;&nbsp;</td>
<td>name of group</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodgetgrnam"></a>
<h3>method getgrnam <span class="smalllinenumber">[line 254]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code><a href="../types/group.html">group</a> getgrnam(
string
$gidNumber)</code>
</td></tr></table>
</td></tr></table><br />
This function returns the group name to an existing gidNumber.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>name</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$gidNumber</b>&nbsp;&nbsp;</td>
<td>GID number</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodget_cache"></a>
<h3>method get_cache <span class="smalllinenumber">[line 93]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>array get_cache(
mixed
$attributes, string
$objectClass, mixed
$scopelist)</code>
</td></tr></table>
</td></tr></table><br />
Queries the cache for a list of LDAP entries and their attributes.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>The found LDAP entries. <br />Format: array(dn1 =&gt; array(uidnumber1), dn2 =&gt; array(uidnumber2), ... ) if $attributes is of type string <br />or array(dn1 =&gt; array(uid =&gt; array(myuid), uidNumber =&gt; array(1234)), ... ) if $attributes is an array</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">mixed&nbsp;&nbsp;</td>
<td><b>$attributes</b>&nbsp;&nbsp;</td>
<td>One (string) or many (array) attribute names.</td>
</tr>
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$objectClass</b>&nbsp;&nbsp;</td>
<td>The resulting entries need to contain this object class.</td>
</tr>
<tr>
<td class="type">mixed&nbsp;&nbsp;</td>
<td><b>$scopelist</b>&nbsp;&nbsp;</td>
<td>the account type(s) as string or array, all scopes if NULL given</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodin_cache"></a>
<h3>method in_cache <span class="smalllinenumber">[line 138]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void in_cache(
string
$value, string
$attribute, mixed
$scopelist)</code>
</td></tr></table>
</td></tr></table><br />
This function returns the DN if an LDAP entry with $attribute=$value is found.<br /><br /><br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$value</b>&nbsp;&nbsp;</td>
<td>is the searched value of the attribute $attribute</td>
</tr>
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$attribute</b>&nbsp;&nbsp;</td>
<td>name of the LDAP attribute</td>
</tr>
<tr>
<td class="type">mixed&nbsp;&nbsp;</td>
<td><b>$scopelist</b>&nbsp;&nbsp;</td>
<td>the account type(s) as string or array, all scopes if NULL given</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodrefresh_cache"></a>
<h3>method refresh_cache <span class="smalllinenumber">[line 173]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void refresh_cache(
[boolean
$rebuild = false])</code>
</td></tr></table>
</td></tr></table><br />
This function refreshes the cache.<br /><br /><br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">boolean&nbsp;&nbsp;</td>
<td><b>$rebuild</b>&nbsp;&nbsp;</td>
<td>forces a refresh if set to true</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="method__sleep"></a>
<h3>method __sleep <span class="smalllinenumber">[line 272]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>array __sleep(
)</code>
</td></tr></table>
</td></tr></table><br />
Encrypts LDAP cache before saving to session file.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b>&nbsp;&nbsp;</td><td>list of variables to save</td>
</tr>
</table>
</div>
<br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="method__wakeup"></a>
<h3>method __wakeup <span class="smalllinenumber">[line 281]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void __wakeup(
)</code>
</td></tr></table>
</td></tr></table><br />
Decrypts LDAP cache after loading from session file.<br /><br /><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
</div><br />
<div class="credit">
<hr />
Documentation generated on Wed, 15 Nov 2006 18:00:38 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.2.3</a>
</div>
</td></tr></table>
</td>
</tr>
</table>
</body>
</html>