mirror of
https://github.com/php/doc-ja.git
synced 2026-03-23 22:52:11 +01:00
filter: fix XML to remove useless wrapping para tags via automatic script
This commit is contained in:
@@ -1,17 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: ce3a6b07e255897b67c74824aebaf0ccb89b86d3 Maintainer: takagi Status: ready -->
|
||||
<!-- EN-Revision: 627f933cfe6a033dccac32982cd68e7c1b86927f Maintainer: takagi Status: ready -->
|
||||
<!-- Credits: mumumu -->
|
||||
|
||||
<chapter xml:id="filter.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="filter.examples">
|
||||
&reftitle.examples;
|
||||
|
||||
<section xml:id="filter.examples.validation">
|
||||
<title>検証</title>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>filter_var</function> でのメールアドレスの検証</title>
|
||||
<programlisting role="php" xml:id="filter.examples.validation.email">
|
||||
<example>
|
||||
<title><function>filter_var</function> でのメールアドレスの検証</title>
|
||||
<programlisting role="php" xml:id="filter.examples.validation.email">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$email_a = 'joe@example.com';
|
||||
@@ -27,21 +25,19 @@ if (filter_var($email_b, FILTER_VALIDATE_EMAIL)) {
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
'joe@example.com' はメールアドレスとして有効です。
|
||||
'bogus' はメールアドレスとして無効です。
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</screen>
|
||||
</example>
|
||||
|
||||
<para>
|
||||
<example>
|
||||
<title><function>filter_var</function> での IP アドレスの検証</title>
|
||||
<programlisting role="php" xml:id="filter.examples.validation.ip">
|
||||
<example>
|
||||
<title><function>filter_var</function> での IP アドレスの検証</title>
|
||||
<programlisting role="php" xml:id="filter.examples.validation.ip">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$ip_a = '127.0.0.1';
|
||||
@@ -55,20 +51,18 @@ if (filter_var($ip_b, FILTER_VALIDATE_IP)) {
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
'127.0.0.1' は IP アドレスとして有効です。
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</screen>
|
||||
</example>
|
||||
|
||||
<para>
|
||||
<example>
|
||||
<title><function>filter_var</function> でのオプションの指定</title>
|
||||
<programlisting role="php" xml:id="filter.examples.validation.options">
|
||||
<example>
|
||||
<title><function>filter_var</function> でのオプションの指定</title>
|
||||
<programlisting role="php" xml:id="filter.examples.validation.options">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$int_a = '1';
|
||||
@@ -96,16 +90,15 @@ if (($int_c = filter_var($int_c, FILTER_VALIDATE_INT, $options)) !== FALSE) {
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
整数値 A '1' は有効な値 (0 から 3 までの間) です。
|
||||
整数値 C '1' は有効な値 (0 から 3 までの間) です。
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</screen>
|
||||
</example>
|
||||
</section>
|
||||
|
||||
<section xml:id="filter.examples.sanitization">
|
||||
@@ -156,7 +149,6 @@ if (filter_var($sanitized_c, FILTER_VALIDATE_EMAIL)) {
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
@@ -177,4 +169,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 12bc0b7e22bba24b2630951483fa1baf7f80d340 Maintainer: takagi Status: ready -->
|
||||
<!-- EN-Revision: 627f933cfe6a033dccac32982cd68e7c1b86927f Maintainer: takagi Status: ready -->
|
||||
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
|
||||
<refentry xml:id="function.filter-has-var" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.filter-has-var">
|
||||
<refnamediv>
|
||||
<refname>filter_has_var</refname>
|
||||
<refpurpose>指定した型の変数が存在するかどうかを調べる</refpurpose>
|
||||
@@ -18,28 +18,26 @@
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>input_type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<constant>INPUT_GET</constant>、<constant>INPUT_POST</constant>、
|
||||
<constant>INPUT_COOKIE</constant>、<constant>INPUT_SERVER</constant>、
|
||||
<constant>INPUT_ENV</constant> のいずれか。
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>var_name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
調べたい変数の名前。
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>input_type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<constant>INPUT_GET</constant>、<constant>INPUT_POST</constant>、
|
||||
<constant>INPUT_COOKIE</constant>、<constant>INPUT_SERVER</constant>、
|
||||
<constant>INPUT_ENV</constant> のいずれか。
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>var_name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
調べたい変数の名前。
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 6e4ac10da6c9456f413316677a29d5296bdc5fb4 Maintainer: takagi Status: ready -->
|
||||
<!-- EN-Revision: 627f933cfe6a033dccac32982cd68e7c1b86927f Maintainer: takagi Status: ready -->
|
||||
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
|
||||
<refentry xml:id="function.filter-id" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.filter-id">
|
||||
<refnamediv>
|
||||
<refname>filter_id</refname>
|
||||
<refpurpose>フィルタの名前からフィルタ ID を返す</refpurpose>
|
||||
@@ -17,18 +17,16 @@
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
取得したいフィルタの名前。
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
取得したいフィルタの名前。
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
@@ -39,11 +37,9 @@
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>filter_list</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>filter_list</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 53054bf8decc8648cf2e90a493692a161e2371af Maintainer: mumumu Status: ready -->
|
||||
<refentry xml:id="function.filter-input" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<!-- EN-Revision: 627f933cfe6a033dccac32982cd68e7c1b86927f Maintainer: mumumu Status: ready -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xml:id="function.filter-input">
|
||||
<refnamediv>
|
||||
<refname>filter_input</refname>
|
||||
<refpurpose>指定した名前の変数を外部から受け取り、オプションでそれをフィルタリングする</refpurpose>
|
||||
@@ -69,10 +69,9 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>filter_input</function> の例</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>filter_input</function> の例</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$search_html = filter_input(INPUT_GET, 'search', FILTER_SANITIZE_SPECIAL_CHARS);
|
||||
@@ -81,16 +80,15 @@ echo "You have searched for $search_html.\n";
|
||||
echo "<a href='?search=$search_url'>Search again.</a>";
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
You have searched for Me & son.
|
||||
<a href='?search=Me%20%26%20son'>Search again.</a>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: cbac1ecf71d754707d69bdc344c4031c157eaa54 Maintainer: takagi Status: ready -->
|
||||
<!-- EN-Revision: 627f933cfe6a033dccac32982cd68e7c1b86927f Maintainer: takagi Status: ready -->
|
||||
<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. -->
|
||||
<refentry xml:id="function.filter-list" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.filter-list">
|
||||
<refnamediv>
|
||||
<refname>filter_list</refname>
|
||||
<refpurpose>サポートされるフィルタの一覧を返す</refpurpose>
|
||||
@@ -34,18 +34,17 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>filter_list</function> の例</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>filter_list</function> の例</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
print_r(filter_list());
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
(
|
||||
@@ -69,13 +68,11 @@ Array
|
||||
[17] => callback
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 53054bf8decc8648cf2e90a493692a161e2371af Maintainer: mumumu Status: ready -->
|
||||
<refentry xml:id="function.filter-var-array" xmlns="http://docbook.org/ns/docbook">
|
||||
<!-- EN-Revision: 627f933cfe6a033dccac32982cd68e7c1b86927f Maintainer: mumumu Status: ready -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.filter-var-array">
|
||||
<refnamediv>
|
||||
<refname>filter_var_array</refname>
|
||||
<refpurpose>複数の変数を受け取り、オプションでそれらをフィルタリングする</refpurpose>
|
||||
@@ -92,10 +92,9 @@
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>filter_var_array</function> の例</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>filter_var_array</function> の例</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -135,9 +134,9 @@ var_dump(filter_var_array($data, $filters));
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(6) {
|
||||
["product_id"]=>
|
||||
@@ -160,9 +159,8 @@ array(6) {
|
||||
NULL
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
|
||||
Reference in New Issue
Block a user