[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] =?utf-8?q?svn:_/phpdoc/en/trunk/reference/snmp/functions/_snmp-get-valueretrieval.xml_snmp
From: Christian_Hammers <ch () php ! net>
Date: 2011-02-21 22:39:56
Message-ID: svn-ch-1298327996-308549-1293168318 () svn ! php ! net
[Download RAW message or body]
ch Mon, 21 Feb 2011 22:39:56 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=308549
Log:
Documented snmp_set_valueretrieval() and snmp_get_valueretrieval().
Changed paths:
U phpdoc/en/trunk/reference/snmp/functions/snmp-get-valueretrieval.xml
U phpdoc/en/trunk/reference/snmp/functions/snmp-set-valueretrieval.xml
Modified: phpdoc/en/trunk/reference/snmp/functions/snmp-get-valueretrieval.xml
===================================================================
--- phpdoc/en/trunk/reference/snmp/functions/snmp-get-valueretrieval.xml 2011-02-21 \
21:43:09 UTC (rev 308548)
+++ phpdoc/en/trunk/reference/snmp/functions/snmp-get-valueretrieval.xml 2011-02-21 \
22:39:56 UTC (rev 308549) @@ -1,32 +1,61 @@
<?xml version='1.0' encoding="utf-8"?>
<!-- $Revision$ -->
-<refentry xml:id="function.snmp-get-valueretrieval" \
xmlns="http://docbook.org/ns/docbook"> +<refentry \
xml:id="function.snmp-get-valueretrieval" xmlns="http://docbook.org/ns/docbook" \
xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv>
<refname>snmp_get_valueretrieval</refname>
<refpurpose>
Return the method how the SNMP values will be returned
</refpurpose>
</refnamediv>
+
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
- <type>int</type><methodname>snmp_get_valueretrieval</methodname>
+ <type>int</type>
+ <methodname>snmp_get_valueretrieval</methodname>
<void/>
</methodsynopsis>
-
- &warn.undocumented.func;
-
</refsect1>
-
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ On of the SNMP_VALUE_LIBRARY, SNMP_VALUE_PLAIN, SNMP_VALUE_OBJECT constants.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>Using snmp_get_valueretrieval</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+ $ret = snmpget('localhost', 'public', 'IF-MIB::ifName.1');
+ if (snmp_get_valueretrieval() == SNMP_VALUE_OBJECT) {
+ echo $ret->value;
+ } else {
+ echo $ret;
+ }
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
+
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
- <member><function>snmp_set_valueretrieval</function></member>
+ <member>
+ <function>snmp_set_valueretrieval</function>
+ </member>
+ <member><xref linkend="snmp.constants" /></member>
</simplelist>
</para>
</refsect1>
-
+
</refentry>
<!-- Keep this comment at the end of the file
@@ -49,3 +78,4 @@
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
+
Modified: phpdoc/en/trunk/reference/snmp/functions/snmp-set-valueretrieval.xml
===================================================================
--- phpdoc/en/trunk/reference/snmp/functions/snmp-set-valueretrieval.xml 2011-02-21 \
21:43:09 UTC (rev 308548)
+++ phpdoc/en/trunk/reference/snmp/functions/snmp-set-valueretrieval.xml 2011-02-21 \
22:39:56 UTC (rev 308549) @@ -7,26 +7,103 @@
Specify the method how the SNMP values will be returned
</refpurpose>
</refnamediv>
+
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
- <type>bool</type><methodname>snmp_set_valueretrieval</methodname>
- <methodparam><type>int</type><parameter>method</parameter></methodparam>
+ <type>bool</type>
+ <methodname>snmp_set_valueretrieval</methodname>
+ <methodparam>
+ <type>int</type>
+ <parameter>method</parameter>
+ <initializer>SNMP_VALUE_LIBRARY</initializer>
+ </methodparam>
</methodsynopsis>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term>
+ <parameter>method</parameter>
+ </term>
+ <listitem>
+ <table>
+ <title>types</title>
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>SNMP_VALUE_LIBRARY</entry>
+ <entry>The return values will be as returned by the Net-SNMP \
library.</entry> + </row>
+ <row>
+ <entry>SNMP_VALUE_PLAIN</entry>
+ <entry>The return values will be the plain value without the SNMP type \
hint.</entry> + </row>
+ <row>
+ <entry>SNMP_VALUE_OBJECT</entry>
+ <entry>
+ The return values will be objects with the properties "value" and "type", \
where the latter + is one of the SNMP_OCTET_STR, SNMP_COUNTER etc. \
constants. + </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>Using
+ <function>snmp_set_valueretrieval</function>
+ </title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+ snmp_set_valueretrieval(SNMP_VALUE_LIBRARY);
+ $ret = snmpget('localhost', 'public', 'IF-MIB::ifName.1');
+ // $ret = "STRING: lo"
- &warn.undocumented.func;
+ snmp_set_valueretrieval(SNMP_VALUE_PLAIN);
+ $ret = snmpget('localhost', 'public', 'IF-MIB::ifName.1');
+ // $ret = "lo";
+ snmp_set_valueretrieval(SNMP_VALUE_OBJECT);
+ $ret = snmpget('localhost', 'public', 'IF-MIB::ifName.1');
+ // stdClass Object
+ // (
+ // [type] => 4 <-- SNMP_OCTET_STR, see constants
+ // [value] => lo
+ // )
+
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
- <member><function>snmp_get_valueretrieval</function></member>
+ <member>
+ <function>snmp_get_valueretrieval</function>
+ </member>
+ <member><xref linkend="snmp.constants" /></member>
</simplelist>
</para>
</refsect1>
-
+
</refentry>
<!-- Keep this comment at the end of the file
@@ -49,3 +126,4 @@
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
+
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic