php-doc-en/reference/snmp/functions/snmp-set-quick-print.xml
Christoph Michael Becker 2f493dfdc2 Remove obsolete info from SNMP book
UCD SNMP is long gone, and we're requiring at least NET-SNMP nowadays.  We also
remove obsolete PHP 5 related info.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@352251 c90b9560-bf6c-de11-be94-00142212c4b1
2020-12-28 17:42:40 +00:00

118 lines
3.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.snmp-set-quick-print" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>snmp_set_quick_print</refname>
<refpurpose>Set the value of <parameter>enable</parameter> within the NET-<acronym>SNMP</acronym> library
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>snmp_set_quick_print</methodname>
<methodparam><type>bool</type><parameter>enable</parameter></methodparam>
</methodsynopsis>
<para>
Sets the value of <parameter>enable</parameter> within the NET-<acronym>SNMP</acronym> library. When this
is set (1), the <acronym>SNMP</acronym> library will return 'quick printed' values. This
means that just the value will be printed. When <parameter>enable</parameter> is not
enabled (default) the NET-<acronym>SNMP</acronym> library prints extra information
including the type of the value (i.e. IpAddress or OID). Additionally,
if quick_print is not enabled, the library prints additional hex values
for all strings of three characters or less.
</para>
<para>
By default the NET-<acronym>SNMP</acronym> library returns verbose values, quick_print is
used to return only the value.
</para>
<para>
Currently strings are still returned with extra quotes, this will be
corrected in a later release.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>enable</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
Setting quick_print is often used when using the information returned
rather than displaying it.
</para>
<para>
<example>
<title>Using <function>snmp_set_quick_print</function></title>
<programlisting role="php">
<![CDATA[
<?php
snmp_set_quick_print(0);
$a = snmpget("127.0.0.1", "public", ".1.3.6.1.2.1.2.2.1.9.1");
echo "$a\n";
snmp_set_quick_print(1);
$a = snmpget("127.0.0.1", "public", ".1.3.6.1.2.1.2.2.1.9.1");
echo "$a\n";
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
'Timeticks: (0) 0:00:00.00'
'0:00:00.00'
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>snmp_get_quick_print</function></member>
</simplelist>
</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
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/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
-->