cvs: pearweb /public_html/manual contributing-introducing.php contributing-requirements.php index.php packages.auth.auth.php packages.auth.php
packages.net_checkip.php packages.php packages.skeleton.php standards.cvs.php standards.header.php

From: Date: Sun, 04 Nov 2001 10:10:48 +0000
Subject: cvs: pearweb /public_html/manual contributing-introducing.php contributing-requirements.php index.php packages.auth.auth.php packages.auth.php
packages.net_checkip.php packages.php packages.skeleton.php standards.cvs.php standards.header.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-1254@lists.php.net to get a copy of this message
mj Sun Nov 4 05:10:48 2001 EDT Added files: /pearweb/public_html/manual packages.auth.auth.php Modified files: /pearweb/public_html/manual contributing-introducing.php contributing-requirements.php index.php packages.auth.php packages.net_checkip.php packages.php packages.skeleton.php standards.cvs.php standards.header.php Log: * Manual update

Index: pearweb/public_html/manual/contributing-introducing.php diff -u pearweb/public_html/manual/contributing-introducing.php:1.1 pearweb/public_html/manual/contributing-introducing.php:1.2 --- pearweb/public_html/manual/contributing-introducing.php:1.1 Sun Oct 28 05:51:55 2001 +++ pearweb/public_html/manual/contributing-introducing.php Sun Nov 4 05:10:48 2001 @@ -7,7 +7,7 @@ 'up' => array('contributing-howto.php', 'How to contribute to PEAR'), 'toc' => array( array('contributing-howto.php#contributing-howto', ''), - array('contributing-howto.php#AEN449', ''), + array('contributing-howto.php#AEN473', ''), array('contributing-howto.php#contributing-introduction', 'Introduction'), array('contributing-requirements.php', 'Requirements'), array('contributing-introducing.php', 'Introducing your code')))); Index: pearweb/public_html/manual/contributing-requirements.php diff -u pearweb/public_html/manual/contributing-requirements.php:1.1 pearweb/public_html/manual/contributing-requirements.php:1.2 --- pearweb/public_html/manual/contributing-requirements.php:1.1 Sun Oct 28 05:51:55 2001 +++ pearweb/public_html/manual/contributing-requirements.php Sun Nov 4 05:10:48 2001 @@ -7,7 +7,7 @@ 'up' => array('contributing-howto.php', 'How to contribute to PEAR'), 'toc' => array( array('contributing-howto.php#contributing-howto', ''), - array('contributing-howto.php#AEN449', ''), + array('contributing-howto.php#AEN473', ''), array('contributing-howto.php#contributing-introduction', 'Introduction'), array('contributing-requirements.php', 'Requirements'), array('contributing-introducing.php', 'Introducing your code')))); @@ -34,7 +34,9 @@ HREF=" standards.php" TARGET="_top" >PEAR coding standards</A ->.</P +>. This is + necessary because PEAR has the aim to provide well suited + and standards compliant source code.</P ></LI ><LI ><P @@ -46,7 +48,7 @@ ><LI ><P >You are willing document your code in an appropriate - way.</P + way. The prefered way of documentation is Docbook XML.</P ></LI ></UL > Index: pearweb/public_html/manual/index.php diff -u pearweb/public_html/manual/index.php:1.3 pearweb/public_html/manual/index.php:1.4 --- pearweb/public_html/manual/index.php:1.3 Sun Oct 28 05:51:55 2001 +++ pearweb/public_html/manual/index.php Sun Nov 4 05:10:48 2001 @@ -90,9 +90,9 @@ ><DD ><DL ><DT -><A +>II. <A HREF="packages.auth.php" ->Auth: creating authentication realms</A +>Auth</A ></DT ><DT ><A Index: pearweb/public_html/manual/packages.auth.php diff -u pearweb/public_html/manual/packages.auth.php:1.2 pearweb/public_html/manual/packages.auth.php:1.3 --- pearweb/public_html/manual/packages.auth.php:1.2 Sat Oct 20 11:47:27 2001 +++ pearweb/public_html/manual/packages.auth.php Sun Nov 4 05:10:48 2001 @@ -3,113 +3,54 @@ setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('packages.php', 'PEAR Packages'), - 'next' => array('packages.net_checkip.php', ''), + 'next' => array('packages.auth.auth.php', 'Auth'), 'up' => array('packages.php', 'PEAR Packages'), 'toc' => array( array('packages.php#packages', ''), - array('packages.php#AEN0', ''), - array('packages.auth.php', ''), + array('packages.auth.php', 'Auth'), array('packages.php#AEN0', ''), array('packages.net_checkip.php', '')))); -manualHeader('','packages.auth.php'); +manualHeader('Auth','packages.auth.php'); ?><DIV -CLASS="ARTICLE" +CLASS="reference" +><A +NAME="packages.Auth" +></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" -><A -NAME="AEN416" ->Auth: creating authentication realms</A -></H1 -><HR></DIV +>II. Auth</H1 ><DIV -CLASS="section" -><H1 -CLASS="section" +CLASS="PARTINTRO" ><A -NAME="packages.auth.auth" ->Auth</A -></H1 -><P ->The PEAR Auth package helps you to create PHP based - authentication systems.</P -><P ->The biggest advantage of PEAR Auth is the fact, that it - uses storage containers to read/write the login data. This - containers can be easily docked into the auth system and can - theoretically access to databases, files, LDAP servers etc. - </P -><P ->Usage example:</P -><TABLE -BORDER="0" -BGCOLOR="#E0E0E0" -WIDTH="100%" -><TR -><TD -><PRE -CLASS="programlisting" ->&#13;require_once "Auth/Auth.php"; - -$auth = new Auth("DB", "mysql://martin:test@localhost/test"); - -$auth-&#62;start(); - -if ($auth-&#62;getAuth()) { - echo "You are successfully logged in. Welcome to the system.\n"; - echo "This text is only visible for you because you are logged in.\n"; -} - </PRE -></TD -></TR -></TABLE +NAME="AEN417" +></A ><P ->&#13; The function <B -CLASS="function" ->Auth()</B -> is the constructor of the - Auth class. You can pass two parameters towards it: The first - parameter <TT -CLASS="parameter" -><I ->$storageDriver</I -></TT -> represents the - type of storage container, the class shall use. In our example, - the container is a database. The second parameter <TT -CLASS="parameter" -><I ->&#13; $storageOptions</I -></TT -> defines some parameters that are passed - to the storage container. When using the PEAR DB layer, this - 2nd parameter has to be the DSN string that tells the DB layer how - to connect. - </P -><P ->&#13; The function <B -CLASS="function" ->start()</B -> checks, if the user is - already logged in. If this check leads into a positive result, - the function does nothing more. If <B -CLASS="function" ->start()</B -> - detects, that the user isn't already logged in, it starts the - authentication mechanism: An HTML form is printed and the user - can enter his login data. - </P -><P ->&#13; <B -CLASS="function" ->getAuth()</B -> is a helper function that returns - true if the user is logged and that returns false if he hasn't - already logged in. +>&#13; The PEAR::Auth package helps you to create PHP based + authentication systems. </P ></DIV +><DIV +CLASS="TOC" +><DL +><DT +><B +>Table of Contents</B +></DT +><DT +><A +HREF="packages.auth.auth.php" +><B +CLASS="classname" +>Auth</B +></A +> &#8212; + PHP based authentication systems. + </DT +></DL +></DIV +></DIV ></DIV -><?php manualFooter('','packages.auth.php'); +><?php manualFooter('Auth','packages.auth.php'); ?> Index: pearweb/public_html/manual/packages.net_checkip.php diff -u pearweb/public_html/manual/packages.net_checkip.php:1.2 pearweb/public_html/manual/packages.net_checkip.php:1.3 --- pearweb/public_html/manual/packages.net_checkip.php:1.2 Sat Oct 20 11:47:27 2001 +++ pearweb/public_html/manual/packages.net_checkip.php Sun Nov 4 05:10:48 2001 @@ -2,13 +2,12 @@ sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), - 'prev' => array('packages.auth.php', ''), + 'prev' => array('packages.auth.auth.php', 'Auth'), 'next' => array('contributing.php', 'Contributing to PEAR'), 'up' => array('packages.php', 'PEAR Packages'), 'toc' => array( array('packages.php#packages', ''), - array('packages.php#AEN0', ''), - array('packages.auth.php', ''), + array('packages.auth.php', 'Auth'), array('packages.php#AEN0', ''), array('packages.net_checkip.php', '')))); manualHeader('','packages.net_checkip.php'); @@ -19,7 +18,7 @@ ><H1 CLASS="title" ><A -NAME="AEN435" +NAME="AEN459" >Net_CheckIP: Validation of IPv4 adresses</A ></H1 ><HR></DIV Index: pearweb/public_html/manual/packages.php diff -u pearweb/public_html/manual/packages.php:1.2 pearweb/public_html/manual/packages.php:1.3 --- pearweb/public_html/manual/packages.php:1.2 Sat Oct 20 11:47:27 2001 +++ pearweb/public_html/manual/packages.php Sun Nov 4 05:10:48 2001 @@ -3,7 +3,7 @@ setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('class.pear-error.php', 'PEAR_Error'), - 'next' => array('packages.auth.php', ''), + 'next' => array('packages.auth.php', 'Auth'), 'up' => array('index.php', 'PEAR Manual'), 'toc' => array( array('index.php#manual', ''), @@ -33,9 +33,9 @@ >Table of Contents</B ></DT ><DT -><A +>II. <A HREF="packages.auth.php" ->Auth: creating authentication realms</A +>Auth</A ></DT ><DT ><A Index: pearweb/public_html/manual/packages.skeleton.php diff -u pearweb/public_html/manual/packages.skeleton.php:1.3 pearweb/public_html/manual/packages.skeleton.php:1.4 --- pearweb/public_html/manual/packages.skeleton.php:1.3 Sun Oct 28 05:51:55 2001 +++ pearweb/public_html/manual/packages.skeleton.php Sun Nov 4 05:10:48 2001 @@ -19,7 +19,7 @@ ><H1 CLASS="title" ><A -NAME="AEN481" +NAME="AEN505" >Skeleton for creating PEAR docbook documentation</A ></H1 ><HR></DIV Index: pearweb/public_html/manual/standards.cvs.php diff -u pearweb/public_html/manual/standards.cvs.php:1.3 pearweb/public_html/manual/standards.cvs.php:1.4 --- pearweb/public_html/manual/standards.cvs.php:1.3 Sun Oct 28 05:51:55 2001 +++ pearweb/public_html/manual/standards.cvs.php Sun Nov 4 05:10:48 2001 @@ -32,7 +32,7 @@ >&#13; This section applies only to packages using CVS at cvs.php.net. </P ><P ->&#13; Include the $Id: standards.cvs.php,v 1.3 2001/10/28 10:51:55 mj Exp $ CVS keyword in each file. As each file +>&#13; Include the $Id: standards.cvs.php,v 1.4 2001/11/04 10:10:48 mj Exp $ CVS keyword in each file. As each file is edited, add this tag if it's not yet present (or replace existing forms such as "Last Modified:", etc.). Index: pearweb/public_html/manual/standards.header.php diff -u pearweb/public_html/manual/standards.header.php:1.3 pearweb/public_html/manual/standards.header.php:1.4 --- pearweb/public_html/manual/standards.header.php:1.3 Sun Oct 28 05:51:55 2001 +++ pearweb/public_html/manual/standards.header.php Sun Nov 4 05:10:48 2001 @@ -57,7 +57,7 @@ // | Your Name &#60;you@example.com&#62; | // +----------------------------------------------------------------------+ // -// $Id: standards.header.php,v 1.3 2001/10/28 10:51:55 mj Exp $ +// $Id: standards.header.php,v 1.4 2001/11/04 10:10:48 mj Exp $ </PRE ></TD ></TR Index: pearweb/public_html/manual/packages.auth.auth.php +++ pearweb/public_html/manual/packages.auth.auth.php <?php sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('packages.auth.php', 'Auth'), 'next' => array('packages.net_checkip.php', ''), 'up' => array('packages.auth.php', 'Auth'), 'toc' => array( array('packages.auth.php#packages.Auth', ''), array('packages.auth.php#AEN417', ''), array('packages.auth.auth.php', 'Auth')))); manualHeader('Auth','packages.auth.auth.php'); ?><H1 ><A NAME="packages.Auth.Auth" ><B CLASS="classname" >Auth</B ></A ></H1 ><DIV CLASS="refnamediv" ><A NAME="AEN420" ></A ><B CLASS="classname" >Auth</B >&nbsp;--&nbsp; PHP based authentication systems. </DIV ><DIV CLASS="refsect1" ><A NAME="packages.Auth.Auth.Auth" ></A ><H2 >Auth::Auth</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN426" ></A ><P ></P ><P ><CODE ><CODE CLASS="FUNCDEF" ><B CLASS="function" >Auth::Auth</B ></CODE > (string storageDriver, mixed options, string loginFunction)</CODE ></P ><P ></P ></DIV ><P >&#13; Constructor for the authencation system. The first parameter is the name of the storage driver, that should be used. The second parameter can either be a string containing some login information or an array containing a bunch of options for the storage driver. </P ><P >&#13; The third parameter is the name of user-defined function, that prints the login screen. </P ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN436" ></A ><P ><B >Example 1. Using PEAR::Auth with PEAR::DB container and a user-defined login function</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="programlisting" >&#13;require_once "Auth.php"; function myOutput($username, $status) { if ($status == AUTH_WRONG_LOGIN) { echo "You entered wrong login data!&#60;br / &#62;"; } echo "&#60;form method=\"post\" action=\"" . $HTTP_SERVER_VARS['PHP_SELF'] . "\"&#62;\n"; echo "Username: &#60;input type=\"text\" name=\"username\" value=\"" . $username . "\"&#62;&#60;br /&#62;\n"; echo "Password: &#60;input type=\"password\" name=\"password\"&#62;&#60;br /&#62;\n"; echo "&#60;input type="submit"&#62;&#60;/form&#62;\n"; } $a = new Auth("DB", "mysql://martin:test@localhost/auth", "myOutput"); $a-&#62;start(); if ($a-&#62;getAuth()) { echo "You have been authenticated successfully."; } </PRE ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></DIV ><DIV CLASS="refsect1" ><A NAME="packages.Auth.Auth.start" ></A ><H2 >Auth::start</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN441" ></A ><P ></P ><P ><CODE ><CODE CLASS="FUNCDEF" ><B CLASS="function" >Auth::start</B ></CODE > ()</CODE ></P ><P ></P ></DIV ><P >&#13; Start the authentication process. </P ></DIV ><DIV CLASS="refsect1" ><A NAME="packages.Auth.Auth.getAuth" ></A ><H2 >Auth::getAuth</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN449" ></A ><P ></P ><P ><CODE ><CODE CLASS="FUNCDEF" >boolean <B CLASS="function" >Auth::getAuth</B ></CODE > ()</CODE ></P ><P ></P ></DIV ><P >&#13; Check if the user has been authenticated. </P ><P >&#13; If the user has already been authenticated, the function returns true. Otherwise it returns false. </P ><P >&#13; For usage example, see <B CLASS="function" >Auth::Auth()</B >. </P ></DIV ><?php manualFooter('Auth','packages.auth.auth.php'); ?>
« previous php.pear.cvs (#1254) next »