cvs: peardoc /en/package/networking/net-mac check.xml constructor.xml findvendor.xml format.xml importvendors.xml setmac.xml
| From: | Andrew Teixeira | Date: | Mon, 01 Jan 2007 17:25:54 +0000 |
| Subject: | cvs: peardoc /en/package/networking/net-mac check.xml constructor.xml findvendor.xml format.xml importvendors.xml setmac.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-9190@lists.php.net to get a copy of this message | ||
atex Mon Jan 1 17:25:54 2007 UTC
Modified files:
/peardoc/en/package/networking/net-mac check.xml constructor.xml
findvendor.xml format.xml
importvendors.xml setmac.xml
Log:
- Updated all net-mac packages to use more pre-defined XML entities
(i.e. &type entries, etc.)
- Also updated a few documentation bugs that referenced an old
incarnation of Net_MAC
- General formatting
- Added 'see' and 'throws' sections to necessary documentation
http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-mac/check.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/en/package/networking/net-mac/check.xml diff -u peardoc/en/package/networking/net-mac/check.xml:1.2 peardoc/en/package/networking/net-mac/check.xml:1.3 --- peardoc/en/package/networking/net-mac/check.xml:1.2 Sun Dec 31 01:06:16 2006 +++ peardoc/en/package/networking/net-mac/check.xml Mon Jan 1 17:25:53 2007 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="package.networking.net-mac.check"> <refnamediv> <refname>Net_MAC::check()</refname> @@ -10,9 +10,9 @@ require_once 'Net/MAC.php'; </funcsynopsisinfo> <funcprototype> - <funcdef>string <function>Net_MAC::check</function></funcdef> - <paramdef>string <parameter>$input</parameter></paramdef> - <paramdef>string <parameter>$delimiter</parameter></paramdef> + <funcdef>&type.string; <function>Net_MAC::check</function></funcdef> + <paramdef>&type.string; <parameter>$input</parameter></paramdef> + <paramdef>&type.string; <parameter><optional>$delimiter=':'</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> @@ -28,14 +28,15 @@ <itemizedlist> <listitem> <para> - <parameter>string $input</parameter> - The string containing the MAC - Address + <parameter>&type.string; $input</parameter> - The + &type.string; containing the MAC Address </para> </listitem> <listitem> <para> - <parameter>string $delimiter</parameter> - The string representing the - delimiter to use when checking the MAC Address + <parameter>&type.string; $delimiter</parameter> - The + &type.string; representing the delimiter to use when checking + the MAC Address </para> </listitem> </itemizedlist> @@ -44,12 +45,13 @@ <refsect1 id="package.networking.net-mac.check.return"> &title.returns; <para> - <parameter>bool</parameter> - &true if the MAC address is valid, &false otherwise + <parameter>&type.bool;</parameter> - &true if the MAC address is + valid, &false otherwise </para> </refsect1> <refsect1 id="package.networking.net-mac.check.note"> &title.note; - ¬e.canstatic; + ¬e.shouldstatic; </refsect1> <refsect1 id="package.networking.net-mac.check.example"> &title.example; @@ -59,18 +61,20 @@ <![CDATA[ require_once "Net/MAC.php"; -$mac = Net_MAC::check("AB:CD:EF:00:11:22"); +$macaddr = 'AB:CD:EF:00:11:22'; + +$mac = Net_MAC::check($macaddr); if ($mac) { - echo "$mac"; + echo "$macaddr is valid"; } else { - echo "MAC address is invalid"; + echo "$macaddr is invalid"; } ]]> </programlisting> <para> This would output the following: -<screen>ab:cd:ef:00:11:22</screen> +<screen>ab:cd:ef:00:11:22 is valid</screen> </para> </example> <example> @@ -80,39 +84,23 @@ <![CDATA[ require_once "Net/MAC.php"; -$mac = Net_MAC::check("AB:CD:EF:00:11:22", '-'); +$macaddr = 'AB:CD:EF:00:11:22'; + +$mac = Net_MAC::check($macaddr, '-'); if ($mac) { - echo "$mac"; + echo "$macaddr is valid"; } else { - echo "MAC address is invalid"; + echo "$macaddr is invalid"; } ]]> </programlisting> <para> This would output the following: -<screen>ab-cd-ef-00-11-22</screen> +<screen>AB:CD:EF:00:11:22 is invalid</screen> </para> - </example> - <example> - <title>Using <function>check</function> to get a MAC address with all - capital alpha characters</title> - <programlisting role="php"> - <![CDATA[ -require_once "Net/MAC.php"; - -$mac = Net_MAC::check("AB:CD:EF:00:11:22", '', true); -if ($mac) { - echo "$mac"; -} -else { - echo "MAC address is invalid"; -} -]]> - </programlisting> <para> - This would output the following: -<screen>ABCDEF001122</screen> + since the delimiter '-' was not used in the provided MAC address. </para> </example> </refsect1> http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-mac/constructor.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/en/package/networking/net-mac/constructor.xml diff -u peardoc/en/package/networking/net-mac/constructor.xml:1.2 peardoc/en/package/networking/net-mac/constructor.xml:1.3 --- peardoc/en/package/networking/net-mac/constructor.xml:1.2 Sun Dec 31 00:38:09 2006 +++ peardoc/en/package/networking/net-mac/constructor.xml Mon Jan 1 17:25:53 2007 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="package.networking.net-mac.constructor"> <refnamediv> <refname>Net_MAC::__construct()</refname> @@ -11,8 +11,8 @@ </funcsynopsisinfo> <funcprototype> <funcdef><function>Net_MAC::__construct</function></funcdef> - <paramdef>object <parameter>$db</parameter></paramdef> - <paramdef>array <parameter>$options</parameter></paramdef> + <paramdef>&type.object; <parameter>$db</parameter></paramdef> + <paramdef>&type.array; <parameter>$options</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> @@ -20,7 +20,7 @@ &title.desc; <para> This is the constructor that will create and populate a valid - Net_MAC object. + Net_MAC &type.object;. </para> </refsect1> <refsect1 id="package.networking.net-mac.constructor.parameter"> @@ -29,12 +29,17 @@ <itemizedlist> <listitem> <para> - <parameter>object $db</parameter>This parameter must be a - valid <link linkend="package.database.mdb2.intro-connect">MDB2</link> - object. - <parameter>array $options</parameter>An array of options to - use with the database in retrieving MAC address vendors. The - associative array should have key/value pairs as follows: + <parameter>&type.object; $db</parameter> - This parameter must + be a valid <link linkend="package.database.mdb2.intro-connect">MDB2</link> + &type.object;. + </para> + </listitem> + <listitem> + <para> + <parameter>&type.array; $options</parameter> - An &type.array; + of options to use with the database in retrieving MAC address + vendors. The associative &type.array; should have key/value + pairs as follows: <table> <title>Net_MAC::__construct() options</title> <tgroup cols="2"> @@ -77,21 +82,22 @@ <refsect1 id="package.networking.net-mac.constructor.return"> &title.returns; <para> - <parameter>void</parameter> - No return value. A <link linkend="package.networking.net-mac.net-mac-exception">Net_MAC_Exception</link> - Exception object will be thrown if there is an error during - construction so the constructor should be called from a try/catch - block + <parameter>&type.void;</parameter> - No return value. A <link linkend="package.networking.net-mac.net-mac-exception">Net_MAC_Exception</link> + Exception &type.object; will be thrown if there is an error + during construction </para> </refsect1> <refsect1 id="package.networking.net-mac.constructor.note"> &title.note; <para> + The constructor can throw exceptions on error, so the constructor + should always be called from inside a try/catch block. </para> - </refsect1> + </refsect1> <refsect1 id="package.networking.net-mac.constructor.example"> &title.example; <example> - <title>Instantiating a Net_MAC object</title> + <title>Instantiating a Net_MAC &type.object;</title> <programlisting role="php"> <![CDATA[ require_once 'Net/MAC.php'; @@ -126,6 +132,24 @@ </programlisting> </example> </refsect1> + <refsect1 id="package.networking.net-mac.constructor.throws"> + &title.throws; + <para> + <emphasis>throws</emphasis> <link linkend="package.networking.net-mac.net-mac-exception">Net_MAC_Exception</link> + </para> + </refsect1> + <refsect1 id="package.networking.net-mac.constructor.see"> + &title.see; + <para> + <ulink url="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2.html#methodfactory"><function>MDB2::factory</function></ulink> + </para> + <para> + <ulink url="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2.html#methodisError"><function>MDB2::isError</function></ulink> + </para> + <para> + <ulink url="http://pear.php.net/package/PEAR/docs/latest/PEAR/PEAR_Error.html#methodgetUserInfo"><function>PEAR_Error::getUserInfo</function></ulink> + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-mac/findvendor.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/en/package/networking/net-mac/findvendor.xml diff -u peardoc/en/package/networking/net-mac/findvendor.xml:1.3 peardoc/en/package/networking/net-mac/findvendor.xml:1.4 --- peardoc/en/package/networking/net-mac/findvendor.xml:1.3 Sun Dec 31 01:06:16 2006 +++ peardoc/en/package/networking/net-mac/findvendor.xml Mon Jan 1 17:25:53 2007 @@ -1,8 +1,8 @@ -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="package.networking.net-mac.findvendor"> <refnamediv> <refname>findVendor()</refname> - <refpurpose>Finds the vendor of the MAC address stored in the object</refpurpose> + <refpurpose>Finds the vendor of the MAC address stored in the &type.object;</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> @@ -10,9 +10,9 @@ require_once 'Net/MAC.php'; </funcsynopsisinfo> <funcprototype> - <funcdef>mixed <function>findVendor</function></funcdef> - <paramdef>string <parameter><optional>$getDescription = &false;</optional></parameter></paramdef> - <paramdef>string <parameter><optional>$macList = &null;</optional></parameter></paramdef> + <funcdef>&type.mixed; <function>findVendor</function></funcdef> + <paramdef>&type.string; <parameter><optional>$getDescription=&false;</optional></parameter></paramdef> + <paramdef>&type.string; <parameter><optional>$macList=&null;</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> @@ -22,11 +22,11 @@ This method will search through the database to find a vendor that matches the MAC address stored in the class using <link linkend="package.networking.net-mac.setmac"><function>setMac</function></link>. - If the $macList parameter is set, the method will use the array - stored in $macList as the data source to find the MAC vendor - instead of the database. The array would have to be an array - with the same characteristics as one returned from the - <link linkend="package.networking.net-mac.importvendors"><function>importVendors</function></link> + If the $macList parameter is set, the method will use the + &type.array; stored in $macList as the data source to find the + MAC vendor instead of the database. The &type.array; would have + to be an &type.array; with the same characteristics as one + returned from the <link linkend="package.networking.net-mac.importvendors"><function>importVendors</function></link> method when using the $doReturn parameter. </para> </refsect1> @@ -36,17 +36,17 @@ <itemizedlist> <listitem> <para> - <parameter>string $getDescription</parameter>If set to &true;, - the return value will be an array with keys 'vendor' and - 'description'. Normally the method will simply return the - vendor name. + <parameter>&type.string; $getDescription</parameter> - If set + to &true;, the return value will be an &type.array; with keys + 'vendor' and 'description'. Normally the method will simply + return the vendor name. </para> </listitem> <listitem> <para> - <parameter>string $macList</parameter>An optional list of - MAC-to-vendor relationships to search instead of using the - database. + <parameter>&type.string; $macList</parameter> - An optional + list of MAC-to-vendor relationships to search instead of using + the database. </para> </listitem> </itemizedlist> @@ -55,16 +55,16 @@ <refsect1 id="package.networking.net-mac.findvendor.return"> &title.returns; <para> - <parameter>mixed</parameter> - Returns an associative array if - $getDescription is &true;, returns a string with the vendor name - if $getDescription is &false;. If the MAC vendor cannot be found - in the vendor list, &false; is returned. + <parameter>&type.mixed;</parameter> - Returns an associative + &type.array; if $getDescription is &true;, returns a + &type.string; with the vendor name if $getDescription is &false;. + If the MAC vendor cannot be found in the vendor list, &false; is + returned. </para> </refsect1> <refsect1 id="package.networking.net-mac.findvendor.note"> &title.note; - <para> - </para> + ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-mac.findvendor.example"> &title.example; @@ -120,6 +120,21 @@ </para> </example> </refsect1> + <refsect1 id="package.networking.net-mac.findvendor.see"> + &title.see; + <para> + <link linkend="package.networking.net-mac.constructor"><function>Net_MAC::__construct</function></link> + </para> + <para> + <ulink url="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2.html#methodfactory"><function>MDB2::factory</function></ulink> + </para> + <para> + <ulink url="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2.html#methodisError"><function>MDB2::isError</function></ulink> + </para> + <para> + <ulink url="http://pear.php.net/package/PEAR/docs/latest/PEAR/PEAR_Error.html#methodgetUserInfo"><function>PEAR_Error::getUserInfo</function></ulink> + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-mac/format.xml?r1=1.4&r2=1.5&diff_format=u Index: peardoc/en/package/networking/net-mac/format.xml diff -u peardoc/en/package/networking/net-mac/format.xml:1.4 peardoc/en/package/networking/net-mac/format.xml:1.5 --- peardoc/en/package/networking/net-mac/format.xml:1.4 Mon Jan 1 16:24:12 2007 +++ peardoc/en/package/networking/net-mac/format.xml Mon Jan 1 17:25:53 2007 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="package.networking.net-mac.format"> <refnamediv> <refname>Net_MAC::format()</refname> @@ -10,10 +10,10 @@ require_once 'Net/MAC.php'; </funcsynopsisinfo> <funcprototype> - <funcdef>string <function>Net_MAC::format</function></funcdef> - <paramdef>string <parameter>$input</parameter></paramdef> - <paramdef>string <parameter>$delimiter</parameter></paramdef> - <paramdef>bool <parameter>$uppercase</parameter></paramdef> + <funcdef>&type.string; <function>Net_MAC::format</function></funcdef> + <paramdef>&type.string; <parameter>$input</parameter></paramdef> + <paramdef>&type.string; <parameter><optional>$delimiter=':'</optional></parameter></paramdef> + <paramdef>&type.bool; <parameter><optional>$uppercase=&true;</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> @@ -23,7 +23,7 @@ This function will format a MAC address into XX:XX:XX:XX:XX:XX format from whatever format is passed to the function. The delimiter (':' in the example above) will be replaced with - whatever string is passed to the $delimiter parameter + whatever &type.string; is passed to the $delimiter parameter (default ':'). </para> </refsect1> @@ -33,22 +33,24 @@ <itemizedlist> <listitem> <para> - <parameter>string $input</parameter> - The string containing the MAC - Address + <parameter>&type.string; $input</parameter> - The + &type.string; containing the MAC Address </para> </listitem> <listitem> <para> - <parameter>string $delimiter</parameter> - The string representing the - delimiter to use when formatting the MAC Address + <parameter>&type.string; $delimiter</parameter> - The + &type.string; representing the delimiter to use when + formatting the MAC Address </para> </listitem> <listitem> <para> - <parameter>string $uppercase</parameter> - If set to &true (default), - the alpha characters in the hexadecimal values in the MAC Address - will be returned in uppercase. If &false, the alpha characters in - the hexadecimal values will be returned in lowercase. + <parameter>&type.string; $uppercase</parameter> - If set to + &true (default), the alpha characters in the hexadecimal + values in the MAC Address will be returned in uppercase. If + &false, the alpha characters in the hexadecimal values will be + returned in lowercase. </para> </listitem> </itemizedlist> @@ -57,13 +59,13 @@ <refsect1 id="package.networking.net-mac.format.return"> &title.returns; <para> - <parameter>string</parameter> - The formatted MAC Address or &false if the - syntax of the MAC address is invalid + <parameter>&type.string;</parameter> - The formatted MAC Address + or &false if the syntax of the MAC address is invalid </para> </refsect1> <refsect1 id="package.networking.net-mac.format.note"> &title.note; - ¬e.canstatic; + ¬e.shouldstatic; </refsect1> <refsect1 id="package.networking.net-mac.format.example"> &title.example; @@ -91,13 +93,13 @@ </programlisting> <para> This would output the following: -<screen>ab:cd:ef:00:11:22</screen> +<screen>AB:CD:EF:00:11:22</screen> </para> </example> <example> - <title>Using <function>format</function> to get a MAC address with a - different delimiter</title> - <programlisting role="php"> + <title>Using <function>format</function> to get a MAC address + with a different delimiter</title> + <programlisting role="php"> <![CDATA[ require_once "Net/MAC.php"; @@ -118,14 +120,14 @@ ]]> </programlisting> <para> - This would output the following: -<screen>ab-cd-ef-00-11-22</screen> + This would output the following: +<screen>AB-CD-EF-00-11-22</screen> </para> </example> <example> - <title>Using <function>format</function> to get a MAC address with all - capital alpha characters</title> - <programlisting role="php"> + <title>Using <function>format</function> to get a MAC address + with all capital alpha characters</title> + <programlisting role="php"> <![CDATA[ require_once "Net/MAC.php"; http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-mac/importvendors.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/en/package/networking/net-mac/importvendors.xml diff -u peardoc/en/package/networking/net-mac/importvendors.xml:1.3 peardoc/en/package/networking/net-mac/importvendors.xml:1.4 --- peardoc/en/package/networking/net-mac/importvendors.xml:1.3 Sun Dec 31 01:06:16 2006 +++ peardoc/en/package/networking/net-mac/importvendors.xml Mon Jan 1 17:25:53 2007 @@ -1,8 +1,8 @@ -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="package.networking.net-mac.importvendors"> <refnamediv> <refname>importVendors()</refname> - <refpurpose>Import a manufacturers' file to the database or to an array</refpurpose> + <refpurpose>Import a manufacturers' file to the database or to an &type.array;</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> @@ -10,9 +10,9 @@ require_once 'Net/MAC.php'; </funcsynopsisinfo> <funcprototype> - <funcdef>mixed <function>importVendors</function></funcdef> - <paramdef>string <parameter>$file</parameter></paramdef> - <paramdef>boolean <parameter><optional>$doReturn = &false;</optional></parameter></paramdef> + <funcdef>&type.mixed; <function>importVendors</function></funcdef> + <paramdef>&type.string; <parameter>$file</parameter></paramdef> + <paramdef>&type.bool; <parameter><optional>$doReturn=&false;</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> @@ -25,9 +25,9 @@ If the $doReturn parameter is &false;, then the data will be imported into the database defined by the factory of this class. However, if $doReturn is &true;, then the return will be an - associative array with the key being the MAC address prefix and - the data being an associative array with the keys 'vendor' and - 'description'. + associative &type.array; with the key being the MAC address prefix + and the data being an associative &type.array; with the keys + 'vendor' and 'description'. </para> </refsect1> <refsect1 id="package.networking.net-mac.importvendors.parameter"> @@ -36,15 +36,15 @@ <itemizedlist> <listitem> <para> - <parameter>string $file</parameter>The filename or URL of the - manufacturers' file to parse + <parameter>&type.string; $file</parameter> - The filename or + URL of the manufacturers' file to parse </para> </listitem> <listitem> <para> - <parameter>string $doReturn</parameter>If &true;, an array - will be returned, if &false;, the data will be imported into - the database. + <parameter>&type.string; $doReturn</parameter> - If &true;, an + &type.array; will be returned, if &false;, the data will be + imported into the database. </para> </listitem> </itemizedlist> @@ -53,22 +53,25 @@ <refsect1 id="package.networking.net-mac.importvendors.return"> &title.returns; <para> - <parameter>mixed</parameter> - If $doReturn is &true;, the method - will return an array. Otherwise, the method will return &true; - on success. A <link linkend="package.networking.net-mac.net-mac-exception">Net_MAC_Exception</link> - Exception object will be thrown on failure in either case. + <parameter>&type.mixed;</parameter> - If $doReturn is &true;, the + method will return an &type.array;. Otherwise, the method will + return &true; on success. A <link linkend="package.networking.net-mac.net-mac-exception">Net_MAC_Exception</link> + Exception &type.object; will be thrown on failure in either case. </para> </refsect1> <refsect1 id="package.networking.net-mac.importvendors.note"> &title.note; + ¬e.notstatic; <para> + This method can throw exceptions on error, so the method should + always be called from inside a try/catch block. </para> </refsect1> <refsect1 id="package.networking.net-mac.importvendors.example"> &title.example; <example> <title>Using <function>importVendors</function> with a URL</title> - <programlisting role="php"> + <programlisting role="php"> <![CDATA[ require_once 'Net/MAC.php'; require_once 'MDB2.php'; @@ -114,8 +117,8 @@ </example> <example> <title>Using <function>importVendors</function> with a file, - returning an array</title> - <programlisting role="php"> + returning an &type.array;</title> + <programlisting role="php"> <![CDATA[ require_once 'Net/MAC.php'; require_once 'MDB2.php'; @@ -159,6 +162,27 @@ </para> </example> </refsect1> + <refsect1 id="package.networking.net-mac.importvendors.throws"> + &title.throws; + <para> + <emphasis>throws</emphasis> <link linkend="package.networking.net-mac.net-mac-exception">Net_MAC_Exception</link> + </para> + </refsect1> + <refsect1 id="package.networking.net-mac.importvendors.see"> + &title.see; + <para> + <link linkend="package.networking.net-mac.constructor"><function>Net_MAC::__construct</function></link> + </para> + <para> + <ulink url="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2.html#methodfactory"><function>MDB2::factory</function></ulink> + </para> + <para> + <ulink url="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2.html#methodisError"><function>MDB2::isError</function></ulink> + </para> + <para> + <ulink url="http://pear.php.net/package/PEAR/docs/latest/PEAR/PEAR_Error.html#methodgetUserInfo"><function>PEAR_Error::getUserInfo</function></ulink> + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-mac/setmac.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/en/package/networking/net-mac/setmac.xml diff -u peardoc/en/package/networking/net-mac/setmac.xml:1.3 peardoc/en/package/networking/net-mac/setmac.xml:1.4 --- peardoc/en/package/networking/net-mac/setmac.xml:1.3 Sun Dec 31 01:06:16 2006 +++ peardoc/en/package/networking/net-mac/setmac.xml Mon Jan 1 17:25:53 2007 @@ -1,8 +1,8 @@ -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="package.networking.net-mac.setmac"> <refnamediv> <refname>setMAC()</refname> - <refpurpose>Sets the MAC address in the object</refpurpose> + <refpurpose>Sets the MAC address in the &type.object;</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> @@ -10,17 +10,17 @@ require_once 'Net/MAC.php'; </funcsynopsisinfo> <funcprototype> - <funcdef>mixed <function>setMAC</function></funcdef> - <paramdef>string <parameter>$macaddr</parameter></paramdef> - <paramdef>string <parameter>$delimiter = ':'</parameter></paramdef> + <funcdef>&type.mixed; <function>setMAC</function></funcdef> + <paramdef>&type.string; <parameter>$macaddr</parameter></paramdef> + <paramdef>&type.string; <parameter>$delimiter = ':'</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-mac.setmac.desc"> &title.desc; <para> - This method will set the MAC address in the object given the - passed MAC address and the MAC address delimiter. This method + This method will set the MAC address in the &type.object; given + the passed MAC address and the MAC address delimiter. This method also makes use of the <link linkend="package.networking.net-mac.check"><function>check</function></link> method to make sure that the MAC address is valid. </para> @@ -31,15 +31,15 @@ <itemizedlist> <listitem> <para> - <parameter>string $macaddr</parameter>The string representing - the MAC address + <parameter>&type.string; $macaddr</parameter> - The + &type.string; representing the MAC address </para> </listitem> <listitem> <para> - <parameter>string $delimiter</parameter>The string - representing the delimiter to use when verifying the MAC - Address + <parameter>&type.string; $delimiter</parameter> - The + &type.string; representing the delimiter to use when verifying + the MAC Address </para> </listitem> </itemizedlist> @@ -48,15 +48,14 @@ <refsect1 id="package.networking.net-mac.setmac.return"> &title.returns; <para> - <parameter>boolean</parameter> - Returns &true; if the MAC + <parameter>&type.bool;</parameter> - Returns &true; if the MAC address is set correctly, &false; otherwise (i.e. the MAC address is not valid). </para> </refsect1> <refsect1 id="package.networking.net-mac.setmac.note"> &title.note; - <para> - </para> + ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-mac.setmac.example"> &title.example; @@ -98,6 +97,21 @@ </programlisting> </example> </refsect1> + <refsect1 id="package.networking.net-mac.setmac.see"> + &title.see; + <para> + <link linkend="package.networking.net-mac.constructor"><function>Net_MAC::__construct</function></link> + </para> + <para> + <ulink url="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2.html#methodfactory"><function>MDB2::factory</function></ulink> + </para> + <para> + <ulink url="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2.html#methodisError"><function>MDB2::isError</function></ulink> + </para> + <para> + <ulink url="http://pear.php.net/package/PEAR/docs/latest/PEAR/PEAR_Error.html#methodgetUserInfo"><function>PEAR_Error::getUserInfo</function></ulink> + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables:
http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-mac/check.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/en/package/networking/net-mac/check.xml diff -u peardoc/en/package/networking/net-mac/check.xml:1.2 peardoc/en/package/networking/net-mac/check.xml:1.3 --- peardoc/en/package/networking/net-mac/check.xml:1.2 Sun Dec 31 01:06:16 2006 +++ peardoc/en/package/networking/net-mac/check.xml Mon Jan 1 17:25:53 2007 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="package.networking.net-mac.check"> <refnamediv> <refname>Net_MAC::check()</refname> @@ -10,9 +10,9 @@ require_once 'Net/MAC.php'; </funcsynopsisinfo> <funcprototype> - <funcdef>string <function>Net_MAC::check</function></funcdef> - <paramdef>string <parameter>$input</parameter></paramdef> - <paramdef>string <parameter>$delimiter</parameter></paramdef> + <funcdef>&type.string; <function>Net_MAC::check</function></funcdef> + <paramdef>&type.string; <parameter>$input</parameter></paramdef> + <paramdef>&type.string; <parameter><optional>$delimiter=':'</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> @@ -28,14 +28,15 @@ <itemizedlist> <listitem> <para> - <parameter>string $input</parameter> - The string containing the MAC - Address + <parameter>&type.string; $input</parameter> - The + &type.string; containing the MAC Address </para> </listitem> <listitem> <para> - <parameter>string $delimiter</parameter> - The string representing the - delimiter to use when checking the MAC Address + <parameter>&type.string; $delimiter</parameter> - The + &type.string; representing the delimiter to use when checking + the MAC Address </para> </listitem> </itemizedlist> @@ -44,12 +45,13 @@ <refsect1 id="package.networking.net-mac.check.return"> &title.returns; <para> - <parameter>bool</parameter> - &true if the MAC address is valid, &false otherwise + <parameter>&type.bool;</parameter> - &true if the MAC address is + valid, &false otherwise </para> </refsect1> <refsect1 id="package.networking.net-mac.check.note"> &title.note; - ¬e.canstatic; + ¬e.shouldstatic; </refsect1> <refsect1 id="package.networking.net-mac.check.example"> &title.example; @@ -59,18 +61,20 @@ <![CDATA[ require_once "Net/MAC.php"; -$mac = Net_MAC::check("AB:CD:EF:00:11:22"); +$macaddr = 'AB:CD:EF:00:11:22'; + +$mac = Net_MAC::check($macaddr); if ($mac) { - echo "$mac"; + echo "$macaddr is valid"; } else { - echo "MAC address is invalid"; + echo "$macaddr is invalid"; } ]]> </programlisting> <para> This would output the following: -<screen>ab:cd:ef:00:11:22</screen> +<screen>ab:cd:ef:00:11:22 is valid</screen> </para> </example> <example> @@ -80,39 +84,23 @@ <![CDATA[ require_once "Net/MAC.php"; -$mac = Net_MAC::check("AB:CD:EF:00:11:22", '-'); +$macaddr = 'AB:CD:EF:00:11:22'; + +$mac = Net_MAC::check($macaddr, '-'); if ($mac) { - echo "$mac"; + echo "$macaddr is valid"; } else { - echo "MAC address is invalid"; + echo "$macaddr is invalid"; } ]]> </programlisting> <para> This would output the following: -<screen>ab-cd-ef-00-11-22</screen> +<screen>AB:CD:EF:00:11:22 is invalid</screen> </para> - </example> - <example> - <title>Using <function>check</function> to get a MAC address with all - capital alpha characters</title> - <programlisting role="php"> - <![CDATA[ -require_once "Net/MAC.php"; - -$mac = Net_MAC::check("AB:CD:EF:00:11:22", '', true); -if ($mac) { - echo "$mac"; -} -else { - echo "MAC address is invalid"; -} -]]> - </programlisting> <para> - This would output the following: -<screen>ABCDEF001122</screen> + since the delimiter '-' was not used in the provided MAC address. </para> </example> </refsect1> http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-mac/constructor.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/en/package/networking/net-mac/constructor.xml diff -u peardoc/en/package/networking/net-mac/constructor.xml:1.2 peardoc/en/package/networking/net-mac/constructor.xml:1.3 --- peardoc/en/package/networking/net-mac/constructor.xml:1.2 Sun Dec 31 00:38:09 2006 +++ peardoc/en/package/networking/net-mac/constructor.xml Mon Jan 1 17:25:53 2007 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="package.networking.net-mac.constructor"> <refnamediv> <refname>Net_MAC::__construct()</refname> @@ -11,8 +11,8 @@ </funcsynopsisinfo> <funcprototype> <funcdef><function>Net_MAC::__construct</function></funcdef> - <paramdef>object <parameter>$db</parameter></paramdef> - <paramdef>array <parameter>$options</parameter></paramdef> + <paramdef>&type.object; <parameter>$db</parameter></paramdef> + <paramdef>&type.array; <parameter>$options</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> @@ -20,7 +20,7 @@ &title.desc; <para> This is the constructor that will create and populate a valid - Net_MAC object. + Net_MAC &type.object;. </para> </refsect1> <refsect1 id="package.networking.net-mac.constructor.parameter"> @@ -29,12 +29,17 @@ <itemizedlist> <listitem> <para> - <parameter>object $db</parameter>This parameter must be a - valid <link linkend="package.database.mdb2.intro-connect">MDB2</link> - object. - <parameter>array $options</parameter>An array of options to - use with the database in retrieving MAC address vendors. The - associative array should have key/value pairs as follows: + <parameter>&type.object; $db</parameter> - This parameter must + be a valid <link linkend="package.database.mdb2.intro-connect">MDB2</link> + &type.object;. + </para> + </listitem> + <listitem> + <para> + <parameter>&type.array; $options</parameter> - An &type.array; + of options to use with the database in retrieving MAC address + vendors. The associative &type.array; should have key/value + pairs as follows: <table> <title>Net_MAC::__construct() options</title> <tgroup cols="2"> @@ -77,21 +82,22 @@ <refsect1 id="package.networking.net-mac.constructor.return"> &title.returns; <para> - <parameter>void</parameter> - No return value. A <link linkend="package.networking.net-mac.net-mac-exception">Net_MAC_Exception</link> - Exception object will be thrown if there is an error during - construction so the constructor should be called from a try/catch - block + <parameter>&type.void;</parameter> - No return value. A <link linkend="package.networking.net-mac.net-mac-exception">Net_MAC_Exception</link> + Exception &type.object; will be thrown if there is an error + during construction </para> </refsect1> <refsect1 id="package.networking.net-mac.constructor.note"> &title.note; <para> + The constructor can throw exceptions on error, so the constructor + should always be called from inside a try/catch block. </para> - </refsect1> + </refsect1> <refsect1 id="package.networking.net-mac.constructor.example"> &title.example; <example> - <title>Instantiating a Net_MAC object</title> + <title>Instantiating a Net_MAC &type.object;</title> <programlisting role="php"> <![CDATA[ require_once 'Net/MAC.php'; @@ -126,6 +132,24 @@ </programlisting> </example> </refsect1> + <refsect1 id="package.networking.net-mac.constructor.throws"> + &title.throws; + <para> + <emphasis>throws</emphasis> <link linkend="package.networking.net-mac.net-mac-exception">Net_MAC_Exception</link> + </para> + </refsect1> + <refsect1 id="package.networking.net-mac.constructor.see"> + &title.see; + <para> + <ulink url="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2.html#methodfactory"><function>MDB2::factory</function></ulink> + </para> + <para> + <ulink url="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2.html#methodisError"><function>MDB2::isError</function></ulink> + </para> + <para> + <ulink url="http://pear.php.net/package/PEAR/docs/latest/PEAR/PEAR_Error.html#methodgetUserInfo"><function>PEAR_Error::getUserInfo</function></ulink> + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-mac/findvendor.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/en/package/networking/net-mac/findvendor.xml diff -u peardoc/en/package/networking/net-mac/findvendor.xml:1.3 peardoc/en/package/networking/net-mac/findvendor.xml:1.4 --- peardoc/en/package/networking/net-mac/findvendor.xml:1.3 Sun Dec 31 01:06:16 2006 +++ peardoc/en/package/networking/net-mac/findvendor.xml Mon Jan 1 17:25:53 2007 @@ -1,8 +1,8 @@ -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="package.networking.net-mac.findvendor"> <refnamediv> <refname>findVendor()</refname> - <refpurpose>Finds the vendor of the MAC address stored in the object</refpurpose> + <refpurpose>Finds the vendor of the MAC address stored in the &type.object;</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> @@ -10,9 +10,9 @@ require_once 'Net/MAC.php'; </funcsynopsisinfo> <funcprototype> - <funcdef>mixed <function>findVendor</function></funcdef> - <paramdef>string <parameter><optional>$getDescription = &false;</optional></parameter></paramdef> - <paramdef>string <parameter><optional>$macList = &null;</optional></parameter></paramdef> + <funcdef>&type.mixed; <function>findVendor</function></funcdef> + <paramdef>&type.string; <parameter><optional>$getDescription=&false;</optional></parameter></paramdef> + <paramdef>&type.string; <parameter><optional>$macList=&null;</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> @@ -22,11 +22,11 @@ This method will search through the database to find a vendor that matches the MAC address stored in the class using <link linkend="package.networking.net-mac.setmac"><function>setMac</function></link>. - If the $macList parameter is set, the method will use the array - stored in $macList as the data source to find the MAC vendor - instead of the database. The array would have to be an array - with the same characteristics as one returned from the - <link linkend="package.networking.net-mac.importvendors"><function>importVendors</function></link> + If the $macList parameter is set, the method will use the + &type.array; stored in $macList as the data source to find the + MAC vendor instead of the database. The &type.array; would have + to be an &type.array; with the same characteristics as one + returned from the <link linkend="package.networking.net-mac.importvendors"><function>importVendors</function></link> method when using the $doReturn parameter. </para> </refsect1> @@ -36,17 +36,17 @@ <itemizedlist> <listitem> <para> - <parameter>string $getDescription</parameter>If set to &true;, - the return value will be an array with keys 'vendor' and - 'description'. Normally the method will simply return the - vendor name. + <parameter>&type.string; $getDescription</parameter> - If set + to &true;, the return value will be an &type.array; with keys + 'vendor' and 'description'. Normally the method will simply + return the vendor name. </para> </listitem> <listitem> <para> - <parameter>string $macList</parameter>An optional list of - MAC-to-vendor relationships to search instead of using the - database. + <parameter>&type.string; $macList</parameter> - An optional + list of MAC-to-vendor relationships to search instead of using + the database. </para> </listitem> </itemizedlist> @@ -55,16 +55,16 @@ <refsect1 id="package.networking.net-mac.findvendor.return"> &title.returns; <para> - <parameter>mixed</parameter> - Returns an associative array if - $getDescription is &true;, returns a string with the vendor name - if $getDescription is &false;. If the MAC vendor cannot be found - in the vendor list, &false; is returned. + <parameter>&type.mixed;</parameter> - Returns an associative + &type.array; if $getDescription is &true;, returns a + &type.string; with the vendor name if $getDescription is &false;. + If the MAC vendor cannot be found in the vendor list, &false; is + returned. </para> </refsect1> <refsect1 id="package.networking.net-mac.findvendor.note"> &title.note; - <para> - </para> + ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-mac.findvendor.example"> &title.example; @@ -120,6 +120,21 @@ </para> </example> </refsect1> + <refsect1 id="package.networking.net-mac.findvendor.see"> + &title.see; + <para> + <link linkend="package.networking.net-mac.constructor"><function>Net_MAC::__construct</function></link> + </para> + <para> + <ulink url="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2.html#methodfactory"><function>MDB2::factory</function></ulink> + </para> + <para> + <ulink url="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2.html#methodisError"><function>MDB2::isError</function></ulink> + </para> + <para> + <ulink url="http://pear.php.net/package/PEAR/docs/latest/PEAR/PEAR_Error.html#methodgetUserInfo"><function>PEAR_Error::getUserInfo</function></ulink> + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-mac/format.xml?r1=1.4&r2=1.5&diff_format=u Index: peardoc/en/package/networking/net-mac/format.xml diff -u peardoc/en/package/networking/net-mac/format.xml:1.4 peardoc/en/package/networking/net-mac/format.xml:1.5 --- peardoc/en/package/networking/net-mac/format.xml:1.4 Mon Jan 1 16:24:12 2007 +++ peardoc/en/package/networking/net-mac/format.xml Mon Jan 1 17:25:53 2007 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="package.networking.net-mac.format"> <refnamediv> <refname>Net_MAC::format()</refname> @@ -10,10 +10,10 @@ require_once 'Net/MAC.php'; </funcsynopsisinfo> <funcprototype> - <funcdef>string <function>Net_MAC::format</function></funcdef> - <paramdef>string <parameter>$input</parameter></paramdef> - <paramdef>string <parameter>$delimiter</parameter></paramdef> - <paramdef>bool <parameter>$uppercase</parameter></paramdef> + <funcdef>&type.string; <function>Net_MAC::format</function></funcdef> + <paramdef>&type.string; <parameter>$input</parameter></paramdef> + <paramdef>&type.string; <parameter><optional>$delimiter=':'</optional></parameter></paramdef> + <paramdef>&type.bool; <parameter><optional>$uppercase=&true;</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> @@ -23,7 +23,7 @@ This function will format a MAC address into XX:XX:XX:XX:XX:XX format from whatever format is passed to the function. The delimiter (':' in the example above) will be replaced with - whatever string is passed to the $delimiter parameter + whatever &type.string; is passed to the $delimiter parameter (default ':'). </para> </refsect1> @@ -33,22 +33,24 @@ <itemizedlist> <listitem> <para> - <parameter>string $input</parameter> - The string containing the MAC - Address + <parameter>&type.string; $input</parameter> - The + &type.string; containing the MAC Address </para> </listitem> <listitem> <para> - <parameter>string $delimiter</parameter> - The string representing the - delimiter to use when formatting the MAC Address + <parameter>&type.string; $delimiter</parameter> - The + &type.string; representing the delimiter to use when + formatting the MAC Address </para> </listitem> <listitem> <para> - <parameter>string $uppercase</parameter> - If set to &true (default), - the alpha characters in the hexadecimal values in the MAC Address - will be returned in uppercase. If &false, the alpha characters in - the hexadecimal values will be returned in lowercase. + <parameter>&type.string; $uppercase</parameter> - If set to + &true (default), the alpha characters in the hexadecimal + values in the MAC Address will be returned in uppercase. If + &false, the alpha characters in the hexadecimal values will be + returned in lowercase. </para> </listitem> </itemizedlist> @@ -57,13 +59,13 @@ <refsect1 id="package.networking.net-mac.format.return"> &title.returns; <para> - <parameter>string</parameter> - The formatted MAC Address or &false if the - syntax of the MAC address is invalid + <parameter>&type.string;</parameter> - The formatted MAC Address + or &false if the syntax of the MAC address is invalid </para> </refsect1> <refsect1 id="package.networking.net-mac.format.note"> &title.note; - ¬e.canstatic; + ¬e.shouldstatic; </refsect1> <refsect1 id="package.networking.net-mac.format.example"> &title.example; @@ -91,13 +93,13 @@ </programlisting> <para> This would output the following: -<screen>ab:cd:ef:00:11:22</screen> +<screen>AB:CD:EF:00:11:22</screen> </para> </example> <example> - <title>Using <function>format</function> to get a MAC address with a - different delimiter</title> - <programlisting role="php"> + <title>Using <function>format</function> to get a MAC address + with a different delimiter</title> + <programlisting role="php"> <![CDATA[ require_once "Net/MAC.php"; @@ -118,14 +120,14 @@ ]]> </programlisting> <para> - This would output the following: -<screen>ab-cd-ef-00-11-22</screen> + This would output the following: +<screen>AB-CD-EF-00-11-22</screen> </para> </example> <example> - <title>Using <function>format</function> to get a MAC address with all - capital alpha characters</title> - <programlisting role="php"> + <title>Using <function>format</function> to get a MAC address + with all capital alpha characters</title> + <programlisting role="php"> <![CDATA[ require_once "Net/MAC.php"; http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-mac/importvendors.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/en/package/networking/net-mac/importvendors.xml diff -u peardoc/en/package/networking/net-mac/importvendors.xml:1.3 peardoc/en/package/networking/net-mac/importvendors.xml:1.4 --- peardoc/en/package/networking/net-mac/importvendors.xml:1.3 Sun Dec 31 01:06:16 2006 +++ peardoc/en/package/networking/net-mac/importvendors.xml Mon Jan 1 17:25:53 2007 @@ -1,8 +1,8 @@ -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="package.networking.net-mac.importvendors"> <refnamediv> <refname>importVendors()</refname> - <refpurpose>Import a manufacturers' file to the database or to an array</refpurpose> + <refpurpose>Import a manufacturers' file to the database or to an &type.array;</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> @@ -10,9 +10,9 @@ require_once 'Net/MAC.php'; </funcsynopsisinfo> <funcprototype> - <funcdef>mixed <function>importVendors</function></funcdef> - <paramdef>string <parameter>$file</parameter></paramdef> - <paramdef>boolean <parameter><optional>$doReturn = &false;</optional></parameter></paramdef> + <funcdef>&type.mixed; <function>importVendors</function></funcdef> + <paramdef>&type.string; <parameter>$file</parameter></paramdef> + <paramdef>&type.bool; <parameter><optional>$doReturn=&false;</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> @@ -25,9 +25,9 @@ If the $doReturn parameter is &false;, then the data will be imported into the database defined by the factory of this class. However, if $doReturn is &true;, then the return will be an - associative array with the key being the MAC address prefix and - the data being an associative array with the keys 'vendor' and - 'description'. + associative &type.array; with the key being the MAC address prefix + and the data being an associative &type.array; with the keys + 'vendor' and 'description'. </para> </refsect1> <refsect1 id="package.networking.net-mac.importvendors.parameter"> @@ -36,15 +36,15 @@ <itemizedlist> <listitem> <para> - <parameter>string $file</parameter>The filename or URL of the - manufacturers' file to parse + <parameter>&type.string; $file</parameter> - The filename or + URL of the manufacturers' file to parse </para> </listitem> <listitem> <para> - <parameter>string $doReturn</parameter>If &true;, an array - will be returned, if &false;, the data will be imported into - the database. + <parameter>&type.string; $doReturn</parameter> - If &true;, an + &type.array; will be returned, if &false;, the data will be + imported into the database. </para> </listitem> </itemizedlist> @@ -53,22 +53,25 @@ <refsect1 id="package.networking.net-mac.importvendors.return"> &title.returns; <para> - <parameter>mixed</parameter> - If $doReturn is &true;, the method - will return an array. Otherwise, the method will return &true; - on success. A <link linkend="package.networking.net-mac.net-mac-exception">Net_MAC_Exception</link> - Exception object will be thrown on failure in either case. + <parameter>&type.mixed;</parameter> - If $doReturn is &true;, the + method will return an &type.array;. Otherwise, the method will + return &true; on success. A <link linkend="package.networking.net-mac.net-mac-exception">Net_MAC_Exception</link> + Exception &type.object; will be thrown on failure in either case. </para> </refsect1> <refsect1 id="package.networking.net-mac.importvendors.note"> &title.note; + ¬e.notstatic; <para> + This method can throw exceptions on error, so the method should + always be called from inside a try/catch block. </para> </refsect1> <refsect1 id="package.networking.net-mac.importvendors.example"> &title.example; <example> <title>Using <function>importVendors</function> with a URL</title> - <programlisting role="php"> + <programlisting role="php"> <![CDATA[ require_once 'Net/MAC.php'; require_once 'MDB2.php'; @@ -114,8 +117,8 @@ </example> <example> <title>Using <function>importVendors</function> with a file, - returning an array</title> - <programlisting role="php"> + returning an &type.array;</title> + <programlisting role="php"> <![CDATA[ require_once 'Net/MAC.php'; require_once 'MDB2.php'; @@ -159,6 +162,27 @@ </para> </example> </refsect1> + <refsect1 id="package.networking.net-mac.importvendors.throws"> + &title.throws; + <para> + <emphasis>throws</emphasis> <link linkend="package.networking.net-mac.net-mac-exception">Net_MAC_Exception</link> + </para> + </refsect1> + <refsect1 id="package.networking.net-mac.importvendors.see"> + &title.see; + <para> + <link linkend="package.networking.net-mac.constructor"><function>Net_MAC::__construct</function></link> + </para> + <para> + <ulink url="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2.html#methodfactory"><function>MDB2::factory</function></ulink> + </para> + <para> + <ulink url="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2.html#methodisError"><function>MDB2::isError</function></ulink> + </para> + <para> + <ulink url="http://pear.php.net/package/PEAR/docs/latest/PEAR/PEAR_Error.html#methodgetUserInfo"><function>PEAR_Error::getUserInfo</function></ulink> + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/peardoc/en/package/networking/net-mac/setmac.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/en/package/networking/net-mac/setmac.xml diff -u peardoc/en/package/networking/net-mac/setmac.xml:1.3 peardoc/en/package/networking/net-mac/setmac.xml:1.4 --- peardoc/en/package/networking/net-mac/setmac.xml:1.3 Sun Dec 31 01:06:16 2006 +++ peardoc/en/package/networking/net-mac/setmac.xml Mon Jan 1 17:25:53 2007 @@ -1,8 +1,8 @@ -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="package.networking.net-mac.setmac"> <refnamediv> <refname>setMAC()</refname> - <refpurpose>Sets the MAC address in the object</refpurpose> + <refpurpose>Sets the MAC address in the &type.object;</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> @@ -10,17 +10,17 @@ require_once 'Net/MAC.php'; </funcsynopsisinfo> <funcprototype> - <funcdef>mixed <function>setMAC</function></funcdef> - <paramdef>string <parameter>$macaddr</parameter></paramdef> - <paramdef>string <parameter>$delimiter = ':'</parameter></paramdef> + <funcdef>&type.mixed; <function>setMAC</function></funcdef> + <paramdef>&type.string; <parameter>$macaddr</parameter></paramdef> + <paramdef>&type.string; <parameter>$delimiter = ':'</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-mac.setmac.desc"> &title.desc; <para> - This method will set the MAC address in the object given the - passed MAC address and the MAC address delimiter. This method + This method will set the MAC address in the &type.object; given + the passed MAC address and the MAC address delimiter. This method also makes use of the <link linkend="package.networking.net-mac.check"><function>check</function></link> method to make sure that the MAC address is valid. </para> @@ -31,15 +31,15 @@ <itemizedlist> <listitem> <para> - <parameter>string $macaddr</parameter>The string representing - the MAC address + <parameter>&type.string; $macaddr</parameter> - The + &type.string; representing the MAC address </para> </listitem> <listitem> <para> - <parameter>string $delimiter</parameter>The string - representing the delimiter to use when verifying the MAC - Address + <parameter>&type.string; $delimiter</parameter> - The + &type.string; representing the delimiter to use when verifying + the MAC Address </para> </listitem> </itemizedlist> @@ -48,15 +48,14 @@ <refsect1 id="package.networking.net-mac.setmac.return"> &title.returns; <para> - <parameter>boolean</parameter> - Returns &true; if the MAC + <parameter>&type.bool;</parameter> - Returns &true; if the MAC address is set correctly, &false; otherwise (i.e. the MAC address is not valid). </para> </refsect1> <refsect1 id="package.networking.net-mac.setmac.note"> &title.note; - <para> - </para> + ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-mac.setmac.example"> &title.example; @@ -98,6 +97,21 @@ </programlisting> </example> </refsect1> + <refsect1 id="package.networking.net-mac.setmac.see"> + &title.see; + <para> + <link linkend="package.networking.net-mac.constructor"><function>Net_MAC::__construct</function></link> + </para> + <para> + <ulink url="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2.html#methodfactory"><function>MDB2::factory</function></ulink> + </para> + <para> + <ulink url="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2.html#methodisError"><function>MDB2::isError</function></ulink> + </para> + <para> + <ulink url="http://pear.php.net/package/PEAR/docs/latest/PEAR/PEAR_Error.html#methodgetUserInfo"><function>PEAR_Error::getUserInfo</function></ulink> + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: