2007-12-26 20:43:37 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-07-11 07:47:57 +00:00
|
|
|
<!-- $Revision$ -->
|
2007-12-26 20:43:37 +00:00
|
|
|
<refentry xml:id="numberformatter.geterrorcode" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>NumberFormatter::getErrorCode</refname>
|
|
|
|
<refname>numfmt_get_error_code</refname>
|
2018-01-25 15:34:22 +00:00
|
|
|
<refpurpose>Get formatter's last error code</refpurpose>
|
2007-12-26 20:43:37 +00:00
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
|
|
|
<para>
|
2012-01-11 06:50:17 +00:00
|
|
|
&style.oop;
|
2007-12-26 20:43:37 +00:00
|
|
|
</para>
|
2021-09-05 11:30:49 +00:00
|
|
|
<methodsynopsis role="oop">
|
|
|
|
<modifier>public</modifier> <type>int</type><methodname>NumberFormatter::getErrorCode</methodname>
|
|
|
|
<void/>
|
2008-01-27 15:40:37 +00:00
|
|
|
</methodsynopsis>
|
2007-12-26 20:43:37 +00:00
|
|
|
<para>
|
2012-01-11 06:50:17 +00:00
|
|
|
&style.procedural;
|
2007-12-26 20:43:37 +00:00
|
|
|
</para>
|
2021-09-05 11:30:49 +00:00
|
|
|
<methodsynopsis role="procedural">
|
|
|
|
<type>int</type><methodname>numfmt_get_error_code</methodname>
|
|
|
|
<methodparam><type>NumberFormatter</type><parameter>formatter</parameter></methodparam>
|
2007-12-26 20:43:37 +00:00
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
|
|
Get error code from the last function performed by the formatter.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
|
|
|
<para>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
2021-09-05 11:30:49 +00:00
|
|
|
<term><parameter>formatter</parameter></term>
|
2007-12-26 20:43:37 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
<classname>NumberFormatter</classname> object.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
|
|
|
<para>
|
|
|
|
Returns error code from last formatter call.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="examples">
|
|
|
|
&reftitle.examples;
|
|
|
|
<example>
|
|
|
|
<title><function>numfmt_get_error_code</function> example</title>
|
|
|
|
<programlisting role="php">
|
|
|
|
<![CDATA[
|
|
|
|
<?php
|
|
|
|
$fmt = numfmt_create( 'de_DE', NumberFormatter::DECIMAL );
|
|
|
|
$data = numfmt_format($fmt, 1234567.891234567890000);
|
|
|
|
if(intl_is_failure(numfmt_get_error_code($fmt))) {
|
|
|
|
report_error("Formatter error");
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
]]>
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
<example>
|
|
|
|
<title>OO example</title>
|
|
|
|
<programlisting role="php">
|
|
|
|
<![CDATA[
|
|
|
|
<?php
|
|
|
|
$fmt = new NumberFormatter( 'de_DE', NumberFormatter::DECIMAL );
|
|
|
|
$fmt->format(1234567.891234567890000);
|
2009-01-17 21:13:48 +00:00
|
|
|
if(intl_is_failure($fmt->getErrorCode())) {
|
2007-12-26 20:43:37 +00:00
|
|
|
report_error("Formatter error");
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
]]>
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
|
|
|
<para>
|
|
|
|
<simplelist>
|
|
|
|
<member><function>numfmt_get_error_message</function></member>
|
|
|
|
<member><function>intl_get_error_code</function></member>
|
|
|
|
<member><function>intl_is_failure</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
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2007-12-26 20:43:37 +00:00
|
|
|
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
|
|
|
|
-->
|