1
0
mirror of https://github.com/php/doc-ja.git synced 2026-03-24 07:02:08 +01:00
Files
archived-doc-ja/reference/libxml/functions/libxml-use-internal-errors.xml
Yoshinari Takaoka 2bf8dba825 Generate libxml methodsynopses based on stubs
Based on a patch contributed by Máté Kocsis <kocsismate@woohoolabs.com>.


git-svn-id: https://svn.php.net/repository/phpdoc/ja/trunk@351610 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-24 23:03:25 +00:00

142 lines
3.7 KiB
XML
Executable File

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: f90df97fa5ebfa6e7fcace04976900d6700467cc Maintainer: hirokawa Status: ready -->
<!-- Credits: mumumu -->
<refentry xml:id="function.libxml-use-internal-errors" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>libxml_use_internal_errors</refname>
<refpurpose>
libxmlエラーを無効にし、ユーザーが必要に応じてエラー情報を取得できるようにする
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>libxml_use_internal_errors</methodname>
<methodparam choice="opt"><type class="union"><type>bool</type><type>null</type></type><parameter>use_errors</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
<function>libxml_use_internal_errors</function> により、
標準のlibxmlエラーを無効にし、ユーザーによるエラー処理を有効にすることができます。
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>use_errors</parameter></term>
<listitem>
<para>
ユーザーによるエラー処理を有効 (&true;) または無効 (&false;) にする。
無効にすると、既に存在する libxml のエラーもすべてクリアします。
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
この関数は、
<parameter>use_errors</parameter>の前の値を返します。
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>use_errors</parameter> は、nullable になりました。
これより前のバージョンでは、デフォルトは &false; でした。
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>libxml_use_internal_errors</function>の例</title>
<para>
この例では、libxml関数のエラー処理とこの関数の戻り値の
基本的な使い方を示しています。
</para>
<programlisting role="php">
<![CDATA[
<?php
// ユーザーによるエラー処理を有効にします
var_dump(libxml_use_internal_errors(true));
// ドキュメントを読み込みます
$doc = new DOMDocument;
if (!$doc->load('file.xml')) {
foreach (libxml_get_errors() as $error) {
// ここでエラー処理をします
}
libxml_clear_errors();
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
bool(false)
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>libxml_clear_errors</function></member>
<member><function>libxml_get_errors</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
-->