LDAPAccountManager/lam-web/developers/devel/phpdoc/LDAP/Ldap.html

535 lines
16 KiB
HTML
Raw Normal View History

2008-02-07 19:32:16 +00:00
<html>
<head>
<title>Docs For Class Ldap</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">LDAP</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_LDAP.html" class="menu">class tree: LDAP</a> ]
[ <a href="../elementindex_LDAP.html" class="menu">index: LDAP</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_INSTALL.html">INSTALL</a></p>
<p><a href="../ric_README.html">README</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="../LDAP/_lib---ldap.inc.html"> ldap.inc
</a><br>
</div><br />
<b>Classes:</b><br />
<div class="package">
<a href="../LDAP/Ldap.html">Ldap</a><br />
</div>
</td>
<td>
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
<h1>Class: Ldap</h1>
Source Location: /lib/ldap.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">Ldap manages connection to LDAP and includes several helper functions.</div><br /><br />
</td>
<td valign="top">
<h3><a href="#class_methods">Methods</a></h3>
<ul>
<li><a href="../LDAP/Ldap.html#method__construct">__construct</a></li>
<li><a href="../LDAP/Ldap.html#methodclose">close</a></li>
<li><a href="../LDAP/Ldap.html#methodcmp_array">cmp_array</a></li>
<li><a href="../LDAP/Ldap.html#methodconnect">connect</a></li>
<li><a href="../LDAP/Ldap.html#methoddecrypt">decrypt</a></li>
<li><a href="../LDAP/Ldap.html#methoddecrypt_login">decrypt_login</a></li>
<li><a href="../LDAP/Ldap.html#methoddestroy">destroy</a></li>
<li><a href="../LDAP/Ldap.html#methodencrypt">encrypt</a></li>
<li><a href="../LDAP/Ldap.html#methodencrypt_login">encrypt_login</a></li>
<li><a href="../LDAP/Ldap.html#methodnew_rand">new_rand</a></li>
<li><a href="../LDAP/Ldap.html#methodsearch_units">search_units</a></li>
<li><a href="../LDAP/Ldap.html#methodserver">server</a></li>
<li><a href="../LDAP/Ldap.html#method__sleep">__sleep</a></li>
<li><a href="../LDAP/Ldap.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 52]<br />
Ldap manages connection to LDAP and includes several helper functions.<br /><br /></div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />
<hr />
<a name="class_methods"></a>
<h3>Class Methods</h3>
<div class="tags">
<hr />
<a name="method__construct"></a>
<h3>constructor __construct <span class="smalllinenumber">[line 73]</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>Ldap __construct(
object
$config)</code>
</td></tr></table>
</td></tr></table><br />
<br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">object&nbsp;&nbsp;</td>
<td><b>$config</b>&nbsp;&nbsp;</td>
<td>an object of class Config</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodclose"></a>
<h3>method close <span class="smalllinenumber">[line 125]</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 close(
)</code>
</td></tr></table>
</td></tr></table><br />
Closes connection to server<br /><br /><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodcmp_array"></a>
<h3>method cmp_array <span class="smalllinenumber">[line 314]</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>integer cmp_array(
string
$a, string
$b)</code>
</td></tr></table>
</td></tr></table><br />
Helper function to sort the unit DNs<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>0 if equal, 1 if $a is greater, -1 if $b is greater</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>$a</b>&nbsp;&nbsp;</td>
<td>first argument to compare</td>
</tr>
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$b</b>&nbsp;&nbsp;</td>
<td>second argument to compare</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodconnect"></a>
<h3>method connect <span class="smalllinenumber">[line 89]</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>mixed connect(
string
$user, string
$passwd)</code>
</td></tr></table>
</td></tr></table><br />
Connects to the server using the given username and password<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>if connect succeeds the server handle is returned, else false</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>$user</b>&nbsp;&nbsp;</td>
<td>user name</td>
</tr>
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$passwd</b>&nbsp;&nbsp;</td>
<td>password</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methoddecrypt"></a>
<h3>method decrypt <span class="smalllinenumber">[line 252]</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 decrypt(
object
$data)</code>
</td></tr></table>
</td></tr></table><br />
Decrypts a string<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>decrypted string</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">object&nbsp;&nbsp;</td>
<td><b>$data</b>&nbsp;&nbsp;</td>
<td>string to decrypt</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methoddecrypt_login"></a>
<h3>method decrypt_login <span class="smalllinenumber">[line 291]</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 decrypt_login(
)</code>
</td></tr></table>
</td></tr></table><br />
Decrypts username and password<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>array(user name, password)</td>
</tr>
</table>
</div>
<br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methoddestroy"></a>
<h3>method destroy <span class="smalllinenumber">[line 300]</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 destroy(
)</code>
</td></tr></table>
</td></tr></table><br />
Closes connection to LDAP server and deletes encrypted username/password<br /><br /><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodencrypt"></a>
<h3>method encrypt <span class="smalllinenumber">[line 226]</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>object encrypted encrypt(
string
$data)</code>
</td></tr></table>
</td></tr></table><br />
Encrypts a string<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>string</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>$data</b>&nbsp;&nbsp;</td>
<td>string to encrypt</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodencrypt_login"></a>
<h3>method encrypt_login <span class="smalllinenumber">[line 280]</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 encrypt_login(
string
$username, string
$password)</code>
</td></tr></table>
</td></tr></table><br />
Encrypts username and password<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>$username</b>&nbsp;&nbsp;</td>
<td>LDAP user name</td>
</tr>
<tr>
<td class="type">string&nbsp;&nbsp;</td>
<td><b>$password</b>&nbsp;&nbsp;</td>
<td>LDAP password</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodnew_rand"></a>
<h3>method new_rand <span class="smalllinenumber">[line 212]</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>int new_rand(
)</code>
</td></tr></table>
</td></tr></table><br />
Calculates a new value for rand<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>New random value</td>
</tr>
</table>
</div>
<br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodsearch_units"></a>
<h3>method search_units <span class="smalllinenumber">[line 135]</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 search_units(
string
$suffix)</code>
</td></tr></table>
</td></tr></table><br />
Returns an array with all organizational units under the given suffix<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>DNs of organizational units</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>$suffix</b>&nbsp;&nbsp;</td>
<td>search suffix</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodserver"></a>
<h3>method server <span class="smalllinenumber">[line 166]</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>object connection server(
)</code>
</td></tr></table>
</td></tr></table><br />
Returns the LDAP connection handle<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>handle</td>
</tr>
</table>
</div>
<br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="method__sleep"></a>
<h3>method __sleep <span class="smalllinenumber">[line 176]</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 __sleep(
)</code>
</td></tr></table>
</td></tr></table><br />
Closes connection to LDAP server before serialization<br /><br /><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 183]</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 />
Reconnects to LDAP server when deserialized<br /><br /><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
</div><br />
<div class="credit">
<hr />
Documentation generated on Thu, 07 Feb 2008 20:26:37 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.0</a>
</div>
</td></tr></table>
</td>
</tr>
</table>
</body>
</html>