ref.nis: Switch to new doc style

# Also move constants description in constants.xml


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@229013 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2007-02-05 03:11:27 +00:00
parent 14570047c1
commit d0df1d240c
11 changed files with 436 additions and 116 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<section id="nis.constants">
&reftitle.constants;
&extension.constants;
@ -11,7 +11,7 @@
</term>
<listitem>
<simpara>
The function arguments are bad
</simpara>
</listitem>
</varlistentry>
@ -22,7 +22,7 @@
</term>
<listitem>
<simpara>
YP database is bad
</simpara>
</listitem>
</varlistentry>
@ -33,7 +33,7 @@
</term>
<listitem>
<simpara>
Database busy
</simpara>
</listitem>
</varlistentry>
@ -44,7 +44,7 @@
</term>
<listitem>
<simpara>
4 - no such map in server's domain
</simpara>
</listitem>
</varlistentry>
@ -55,7 +55,7 @@
</term>
<listitem>
<simpara>
5 - no such key in map
</simpara>
</listitem>
</varlistentry>
@ -77,7 +77,7 @@
</term>
<listitem>
<simpara>
Local domain name not set
</simpara>
</listitem>
</varlistentry>
@ -88,7 +88,7 @@
</term>
<listitem>
<simpara>
No more records in map database
</simpara>
</listitem>
</varlistentry>
@ -99,7 +99,7 @@
</term>
<listitem>
<simpara>
Can't communicate with portmapper
</simpara>
</listitem>
</varlistentry>
@ -121,7 +121,7 @@
</term>
<listitem>
<simpara>
RPC failure - domain has been unbound
</simpara>
</listitem>
</varlistentry>
@ -132,7 +132,7 @@
</term>
<listitem>
<simpara>
Can't communicate with ypbind
</simpara>
</listitem>
</varlistentry>
@ -154,7 +154,7 @@
</term>
<listitem>
<simpara>
Can't communicate with ypserv
</simpara>
</listitem>
</varlistentry>
@ -165,7 +165,7 @@
</term>
<listitem>
<simpara>
YP version mismatch
</simpara>
</listitem>
</varlistentry>

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.20 -->
<!-- $Revision: 1.4 $ -->
<refentry id='function.yp-all'>
<refnamediv>
<refname>yp_all</refname>
<refpurpose>Traverse the map and call a function on each entry</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>void</type><methodname>yp_all</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
@ -18,6 +18,44 @@
&warn.undocumented.func;
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>domain</parameter></term>
<listitem>
<para>
The NIS domain name.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>map</parameter></term>
<listitem>
<para>
The NIS map.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>callback</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,21 +1,52 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.20 -->
<!-- $Revision: 1.5 $ -->
<refentry id='function.yp-cat'>
<refnamediv>
<refname>yp_cat</refname>
<refpurpose>Return an array containing the entire map</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>yp_cat</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>map</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_cat</function> returns all map entries as an array with the
maps key values as array indices and the maps entries as array data.
Returns all map entries.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>domain</parameter></term>
<listitem>
<para>
The NIS domain name.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>map</parameter></term>
<listitem>
<para>
The NIS map.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns an array of all map entries, the maps key values as array indices
and the maps entries as array data.
</para>
</refsect1>
</refentry>

View file

@ -1,36 +1,68 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.yp-err-string">
<refnamediv>
<refname>yp_err_string</refname>
<refpurpose>Returns the error string associated with the given error code</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>yp_err_string</methodname>
<methodparam><type>int</type><parameter>errorcode</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_err_string</function> returns the error message
associated with the given error code. Useful to indicate what
exactly went wrong.
Returns the error message associated with the given error code.
Useful to indicate what exactly went wrong.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>errorcode</parameter></term>
<listitem>
<para>
The error code.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the error message, as a string.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Example for NIS errors</title>
<programlisting role="php">
<![CDATA[
<?php
echo "Error: " . yp_err_string(yp_errno());
echo "Error: " . yp_err_string(yp_errno());
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
See also <function>yp_errno</function>.
<simplelist>
<member><function>yp_errno</function></member>
</simplelist>
</para>
</refsect1>
</refentry>

View file

@ -1,48 +1,38 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 -->
<!-- $Revision: 1.4 $ -->
<refentry id="function.yp-errno">
<refnamediv>
<refname>yp_errno</refname>
<refpurpose>Returns the error code of the previous operation</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>yp_errno</methodname>
<void/>
</methodsynopsis>
<para>
<function>yp_errno</function> returns the error code of the
previous operation.
</para>
<para>
Possible errors are:
</para>
<para>
<simplelist>
<member>1 args to function are bad</member>
<member>2 RPC failure - domain has been unbound</member>
<member>3 can't bind to server on this domain</member>
<member>4 no such map in server's domain</member>
<member>5 no such key in map</member>
<member>6 internal yp server or client error</member>
<member>7 resource allocation failure</member>
<member>8 no more records in map database</member>
<member>9 can't communicate with portmapper</member>
<member>10 can't communicate with ypbind</member>
<member>11 can't communicate with ypserv</member>
<member>12 local domain name not set</member>
<member>13 yp database is bad</member>
<member>14 yp version mismatch</member>
<member>15 access violation</member>
<member>16 database busy</member>
</simplelist>
</para>
<para>
See also <function>yp_err_string</function>.
Returns the error code of the previous operation.
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns one of the <literal>YPERR_XXX</literal> error constants.
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>yp_err_string</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,22 +1,58 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 -->
<!-- $Revision: 1.7 $ -->
<refentry id="function.yp-first">
<refnamediv>
<refname>yp_first</refname>
<refpurpose>Returns the first key-value pair from the named map</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>yp_first</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>map</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_first</function> returns the first key-value
pair from the named map in the named domain, otherwise &false;.
Gets the first key-value pair from the named <parameter>map</parameter>
in the named <parameter>domain</parameter>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>domain</parameter></term>
<listitem>
<para>
The NIS domain name.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>map</parameter></term>
<listitem>
<para>
The NIS map.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the first key-value pair as an array on success, or &false; on
errors.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Example for the NIS first</title>
@ -34,11 +70,18 @@ echo "First entry in this map has key " . $key . " and value " . $value;
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
See also <function>yp_next</function> and
<function>yp_get_default_domain</function>.
<simplelist>
<member><function>yp_next</function></member>
<member><function>yp_get_default_domain</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,28 +1,38 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 -->
<!-- $Revision: 1.6 $ -->
<refentry id="function.yp-get-default-domain">
<refnamediv>
<refname>yp_get_default_domain</refname>
<refpurpose>Fetches the machine's default NIS domain</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>yp_get_default_domain</methodname>
<void/>
</methodsynopsis>
<para>
<function>yp_get_default_domain</function> returns the default
domain of the node or &false;. Can be used as the domain parameter
for successive NIS calls.
Returns the default domain of the node. Can be used as the domain
parameter for successive NIS calls.
</para>
<para>
A NIS domain can be described a group of NIS maps. Every host
that needs to look up information binds itself to a certain
domain. Refer to the documents mentioned at the beginning for
more detailed information.
A NIS domain can be described a group of NIS maps. Every host that needs
to look up information binds itself to a certain domain. Refer to the
documents mentioned at the beginning for more detailed information.
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the default domain of the node or &false;. Can be used as the
domain parameter for successive NIS calls.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Example for the default domain</title>
@ -37,6 +47,7 @@ echo "Default NIS domain is: " . $domain;
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,22 +1,56 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 -->
<!-- $Revision: 1.7 $ -->
<refentry id="function.yp-master">
<refnamediv>
<refname>yp_master</refname>
<refpurpose>Returns the machine name of the master NIS server for a map</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>yp_master</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>map</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_master</function> returns the machine name of
the master NIS server for a map.
Returns the machine name of the master NIS server for a
<parameter>map</parameter>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>domain</parameter></term>
<listitem>
<para>
The NIS domain name.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>map</parameter></term>
<listitem>
<para>
The NIS map.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Example for the NIS master</title>
@ -30,10 +64,17 @@ echo "Master for this map is: " . $master;
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
See also <function>yp_get_default_domain</function>.
<simplelist>
<member><function>yp_get_default_domain</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 -->
<!-- $Revision: 1.6 $ -->
<refentry id="function.yp-match">
<refnamediv>
<refname>yp_match</refname>
<refpurpose>Returns the matched line</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>yp_match</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
@ -15,9 +15,52 @@
<methodparam><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_match</function> returns the value associated with
the passed key out of the specified map or &false;. This key must
be exact.</para>
Returns the value associated with the passed <parameter>key</parameter>
out of the specified <parameter>map</parameter>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>domain</parameter></term>
<listitem>
<para>
The NIS domain name.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>map</parameter></term>
<listitem>
<para>
The NIS map.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>key</parameter></term>
<listitem>
<para>
This key must be exact.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the value, or &false; on errors.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Example for NIS match</title>
@ -29,9 +72,7 @@ echo "Matched entry is: " . $entry;
?>
]]>
</programlisting>
<para>
The above code will produce :
</para>
&example.outputs.similar;
<screen>
<![CDATA[
joe:##joe:11111:100:Joe User:/home/j/joe:/usr/local/bin/bash
@ -39,10 +80,17 @@ joe:##joe:11111:100:Joe User:/home/j/joe:/usr/local/bin/bash
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
See also <function>yp_get_default_domain</function>.
<simplelist>
<member><function>yp_get_default_domain</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 -->
<!-- $Revision: 1.10 $ -->
<refentry id="function.yp-next">
<refnamediv>
<refname>yp_next</refname>
<refpurpose>Returns the next key-value pair in the named map</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>yp_next</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
@ -15,9 +15,49 @@
<methodparam><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_next</function> returns the next key-value pair in
the named map after the specified key or &false;.
Returns the next key-value pair in the named <parameter>map</parameter>
after the specified <parameter>key</parameter>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>domain</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>map</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>key</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the next key-value pair as an array, or &false; on errors.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Example for NIS next</title>
@ -40,11 +80,18 @@ echo "The next entry after joe has key " . $key
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
See also <function>yp_first</function> and
<function>yp_get_default_domain</function>.
<simplelist>
<member><function>yp_first</function></member>
<member><function>yp_get_default_domain</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,22 +1,54 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 -->
<!-- $Revision: 1.7 $ -->
<refentry id="function.yp-order">
<refnamediv>
<refname>yp_order</refname>
<refpurpose>Returns the order number for a map</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>yp_order</methodname>
<methodparam><type>string</type><parameter>domain</parameter></methodparam>
<methodparam><type>string</type><parameter>map</parameter></methodparam>
</methodsynopsis>
<para>
<function>yp_order</function> returns the order number for a map
or &false;.
Gets the order number for a map.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>domain</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>map</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the order number for a map or &false; on error.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Example for the NIS order</title>
@ -30,10 +62,17 @@
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
See also <function>yp_get_default_domain</function>.
<simplelist>
<member><function>yp_get_default_domain</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file