cvs: peardoc /peardoc2/en/package/filesystem file-htaccess.xml /peardoc2/en/package/filesystem/file-htaccess file-htaccess.xml intro.xml load.xml
save.xml

From: Date: Thu, 09 Jan 2003 20:46:03 +0000
Subject: cvs: peardoc /peardoc2/en/package/filesystem file-htaccess.xml /peardoc2/en/package/filesystem/file-htaccess file-htaccess.xml intro.xml load.xml
save.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-239@lists.php.net to get a copy of this message
tuupola Thu Jan 9 15:46:03 2003 EDT Added files: /peardoc/peardoc2/en/package/filesystem/file-htaccess file-htaccess.xml intro.xml save.xml Modified files: /peardoc/peardoc2/en/package/filesystem file-htaccess.xml /peardoc/peardoc2/en/package/filesystem/file-htaccess load.xml Log: * continuing documenting File_HtAccess

Index: peardoc/peardoc2/en/package/filesystem/file-htaccess.xml diff -u peardoc/peardoc2/en/package/filesystem/file-htaccess.xml:1.1 peardoc/peardoc2/en/package/filesystem/file-htaccess.xml:1.2 --- peardoc/peardoc2/en/package/filesystem/file-htaccess.xml:1.1 Thu Jan 9 12:48:54 2003 +++ peardoc/peardoc2/en/package/filesystem/file-htaccess.xml Thu Jan 9 15:46:02 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <sect1 id="package.filesystem.file-htaccess"> <title>File_HtAccess</title> @@ -9,6 +9,7 @@ &package.filesystem.file-htaccess.intro; &package.filesystem.file-htaccess.file-htaccess; &package.filesystem.file-htaccess.load; + &package.filesystem.file-htaccess.save; &package.filesystem.file-htaccess.setproperties; &package.filesystem.file-htaccess.setauthname; &package.filesystem.file-htaccess.setauthtype; Index: peardoc/peardoc2/en/package/filesystem/file-htaccess/load.xml diff -u peardoc/peardoc2/en/package/filesystem/file-htaccess/load.xml:1.1 peardoc/peardoc2/en/package/filesystem/file-htaccess/load.xml:1.2 --- peardoc/peardoc2/en/package/filesystem/file-htaccess/load.xml:1.1 Thu Jan 9 12:48:54 2003 +++ peardoc/peardoc2/en/package/filesystem/file-htaccess/load.xml Thu Jan 9 15:46:02 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.filesystem.file-htaccess.load"> <refnamediv> <refname>File_HtAccess::load()</refname> @@ -10,19 +10,25 @@ require_once 'File/HtAccess.php'; </funcsynopsisinfo> <funcprototype> - <funcdef>mixed<function>File_HtAccess::load()</function></funcdef> + <funcdef>mixed <function>File_HtAccess::load</function></funcdef> <paramdef> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> - <refsect1 id="package.filesystem.file-htaccess.close.desc"> + <refsect1 id="package.filesystem.file-htaccess.load.desc"> &title.desc; <para> Load the contents of .htaccess file. </para> </refsect1> - <refsect1 id="package.filesystem.file-passwd.close.note"> + <refsect1 id="package.filesystem.file-htaccess.load.return"> + &title.returns; + <para> + <parameter>mixed</parameter> - &return.success-pearerror; + </para> + </refsect1> + <refsect1 id="package.filesystem.file-htaccess.load.note"> &title.note; &note.notstatic; </refsect1> Index: peardoc/peardoc2/en/package/filesystem/file-htaccess/file-htaccess.xml +++ peardoc/peardoc2/en/package/filesystem/file-htaccess/file-htaccess.xml <!-- $Revision: 1.1 $ --> <refentry id="package.filesystem.file-htaccess.file-htaccess"> <refnamediv> <refname>File_HtAccess::file_htaccess()</refname> <refpurpose>constructor</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'File/HtAccesss.php'; </funcsynopsisinfo> <funcprototype> <funcdef>object <function>new File_HtAccess</function></funcdef> <paramdef> string <parameter><optional>$file </optional></parameter> </paramdef> <paramdef> array <parameter><optional>$params</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.filesystem.file-htaccess.file-htaccess.desc"> &title.desc; <para> Creates a instance of a File_HtAccess object. </para> </refsect1> <refsect1 id="package.filesystem.file-htaccess.file-htaccess.parameter"> &title.params; <para> <itemizedlist> <listitem> <parameter>string $file</parameter> - filename to use. Defaults to <parameter>.htaccess</parameter> </listitem> <listitem> <parameter>array $params</parameter> - a array of parameters which can be: <itemizedlist> <listitem> <parameter>$params['authname']</parameter> - authname </listitem> <listitem> <parameter>$params['authtype']</parameter> - authtype </listitem> <listitem> <parameter>$params['authuserfile']</parameter> - authuserfile </listitem> <listitem> <parameter>$params['authgroupfile']</parameter> - authgroupfile </listitem> <listitem> <parameter>$params['require']</parameter> - require </listitem> <listitem> <parameter>$params['additional']</parameter> - additional </listitem> </itemizedlist> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.filesystem.file-htaccess.file-htaccess.return"> &title.returns; <para> <parameter>object</parameter> - instance of File_HtAccess </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: peardoc/peardoc2/en/package/filesystem/file-htaccess/intro.xml +++ peardoc/peardoc2/en/package/filesystem/file-htaccess/intro.xml <!-- $Revision: 1.1 $ --> <refentry id="package.filesystem.file-htaccess.intro"> <refnamediv> <refname>Introduction</refname> <refpurpose>Create and manipulate .htaccess files</refpurpose> </refnamediv> <refsect1 id="package.filesystem.file-htaccess.intro.whatis"> <title>What is File_HtAccess?</title> <para> <classname>File_HtAccess</classname> provides common methods to create and manipulate Apache / NCSA style .htaccess files. These files together with accompanying password files are used to protect webserver directories. Since <classname>File_HtAccess</classname> does not provide any means to manipulate or create password files you should use it together with <classname>File_Passwd</classname>. </para> </refsect1> <refsect1 id="package.filesystem.file-htaccess.intro.usage"> <title>Example usage</title> <refsect2 id="package.filesystem.file-htaccess.intro.usage.example1"> <title>Example 1</title> <para> In this example you modify an existing file by setting its require property to "valid-user". <para> <programlisting role="php"> <![CDATA[ require_once('File/HtAccess.php'); $h = new File_HtAccess('.htaccess'); $h->load(); $h->setRequire('valid-user'); $h->save(); ]]> </programlisting> </para> </para> </refsect2> <refsect2 id="package.filesystem.file-htaccess.intro.usage.example2"> <title>Example 2</title> <para> In this example you modify an existing file by adding an user to the list of users who are allowed to access. <para> <programlisting role="php"> <![CDATA[ require_once('File/HtAccess.php'); $h = new File_HtAccess('.htaccess'); $h->load(); $h->addRequire('tuupola'); $h->save(); ]]> </programlisting> </para> </para> </refsect2> <refsect2 id="package.filesystem.file-htaccess.intro.usage.example2"> <title>Example 3</title> <para> In this example you create a new file which uses both .htpasswd files for storing username / password pairs and .htgroup file to store username / group information. Additionally requires users to belong to group "admins" to be allowed to access. <para> <programlisting role="php"> <![CDATA[ require_once('File/HtAccess.php'); $params['authname']      = 'Private'; $params['authtype']      = 'Basic'; $params['authuserfile']  = '/path/to/.htpasswd'; $params['authgroupfile'] = '/path/to/.htgroup'; $params['require']       = array('group', 'admins'); $h = new File_HtAccess('/path/to/.htaccess', $params); $h->save(); ]]> </programlisting> </para> </para> </refsect2> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: peardoc/peardoc2/en/package/filesystem/file-htaccess/save.xml +++ peardoc/peardoc2/en/package/filesystem/file-htaccess/save.xml <!-- $Revision: 1.1 $ --> <refentry id="package.filesystem.file-htaccess.save"> <refnamediv> <refname>File_HtAccess::save()</refname> <refpurpose>saves the .htaccess file</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'File/HtAccess.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>File_HtAccesss:save</function></funcdef> <paramdef> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.filesystem.file-htaccess.save.desc"> &title.desc; <para> Saves the contents of File_HtAccess object as a corresponding .htaccess file on the disc. </para> </refsect1> <refsect1 id="package.filesystem.file-htaccess.save.return"> &title.returns; <para> <parameter>mixed</parameter> - &return.success-pearerror; </para> </refsect1> <refsect1 id="package.filesystem.file-htaccess.save.note"> &title.note; &note.notstatic; </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.pear.doc (#239) next »