cvs: peardoc /en/package/authentication/auth/auth auth.xml
| From: | Yavor Shahpasov | Date: | Fri, 25 Jun 2004 00:41:24 +0000 |
| Subject: | cvs: peardoc /en/package/authentication/auth/auth auth.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-4489@lists.php.net to get a copy of this message | ||
yavo Thu Jun 24 20:41:24 2004 EDT
Modified files:
/peardoc/en/package/authentication/auth/auth auth.xml
Log:
Added info about using custom storage containers
http://cvs.php.net/diff.php/peardoc/en/package/authentication/auth/auth/auth.xml?r1=1.8&r2=1.9&ty=u
Index: peardoc/en/package/authentication/auth/auth/auth.xml
diff -u peardoc/en/package/authentication/auth/auth/auth.xml:1.8
peardoc/en/package/authentication/auth/auth/auth.xml:1.9
--- peardoc/en/package/authentication/auth/auth/auth.xml:1.8 Fri Mar 12 12:32:06 2004
+++ peardoc/en/package/authentication/auth/auth/auth.xml Thu Jun 24 20:41:24 2004
@@ -1,4 +1,4 @@
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<refentry id="package.authentication.auth.auth.auth">
<refnamediv>
<refname>Auth::Auth()</refname>
@@ -8,7 +8,7 @@
<funcsynopsis>
<funcprototype>
<funcdef><function>Auth::Auth</function></funcdef>
- <paramdef>string <parameter>$storageDriver =
"DB"</parameter></paramdef>
+ <paramdef>mixed <parameter>$storageDriver =
"DB"</parameter></paramdef>
<paramdef>mixed <parameter>$options =
""</parameter></paramdef>
<paramdef>string <parameter>$loginFunction =
""</parameter></paramdef>
<paramdef>boolean <parameter><optional>$showLogin =
&true;</optional></parameter></paramdef>
@@ -33,7 +33,8 @@
</term>
<listitem>
<para>
- name of the storage driver that should be used
+ name of the storage driver that should be used,
+ alternatively you can pass a custom Auth_Container object.
</para>
</listitem>
</varlistentry>
@@ -88,7 +89,7 @@
</para>
</refsect1>
<refsect1 id="package.authentication.auth.auth.auth.example">
- &title.example;
+ &title.example1;
<example>
<title>Using different DB parameters</title>
<programlisting role="php">
@@ -136,6 +137,50 @@
</para>
</refsect1>
+
+ <refsect1 id="package.authentication.auth.auth.auth.example-customcont">
+ &title.example2;
+ <example>
+ <title>Using different DB parameters</title>
+ <programlisting role="php">
+ <![CDATA[
+<?php
+require_once "Auth/Auth.php";
+
+function myOutput($username, $status)
+{
+ ... /** See example 1 for the full listing */
+}
+
+$a = new Auth(new CustomAuthContainer($options), null, "myOutput");
+
+$a->start();
+
+if ($a->getAuth()) {
+ echo "You have been authenticated successfully.";
+}
+?>
+ ]]>
+ </programlisting>
+ </example>
+
+ <para>
+ This example shows you how you can pass your
+ own storage container to Auth.
+ </para>
+ <para>
+ If the storrage containers supplied with Auth are not capable
+ of fulfiling your requirements, you can easliy create your own
+ storage container.
+ Read the storage containers section for more info
+ <link linkend="package.authentication.auth.intro-storage">
+ Introduction - The storage drivers
+ </link>
+
+ </para>
+
+ </refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
Local variables: