mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
update normalizer docs
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@257836 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
379f0fd299
commit
03f9b0759c
2 changed files with 52 additions and 79 deletions
|
@ -1,27 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="normalizer.isnormalized">
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="normalizer.isnormalized">
|
||||
<refnamediv>
|
||||
<refname>Normalizer::isNormalized</refname>
|
||||
<refname>normalizer_is_normalized</refname>
|
||||
<refpurpose>Checks if the provided string is already in the specified normalization form.</refpurpose>
|
||||
<refpurpose>
|
||||
Checks if the provided string is already in the specified normalization
|
||||
form.
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<modifier>static</modifier>
|
||||
<type>boolean</type>
|
||||
<methodname>Normalizer::isNormalized</methodname>
|
||||
<methodparam><type>string</type><parameter>input</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>form</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<para>Object oriented style</para>
|
||||
<methodsynopsis>
|
||||
<modifier>static</modifier>
|
||||
<type>boolean</type>
|
||||
<methodname>Normalizer::isNormalized</methodname>
|
||||
<methodparam><type>string</type><parameter>input</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>form</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<methodsynopsis>
|
||||
<type>boolean</type>
|
||||
<methodname>normalizer_is_normalized</methodname>
|
||||
|
@ -41,25 +41,13 @@
|
|||
<varlistentry>
|
||||
<term><parameter>input</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string to normalize
|
||||
</para>
|
||||
<para>The input string to normalize</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>form</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
One of the normalization forms
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>options</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Normalization options
|
||||
</para>
|
||||
<para>One of the normalization forms. Defaults to Normalizer::FORM_C.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
@ -69,17 +57,17 @@
|
|||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&true; if normalized, &false; otherwise or if there an error
|
||||
</para>
|
||||
<para>&true; if normalized, &false; otherwise or if there an error</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>normalizer_is_normalized</function> example</title>
|
||||
<title>
|
||||
<function>normalizer_is_normalized</function> example
|
||||
</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<![CDATA[
|
||||
<?php
|
||||
$char_A_ring = "\xC3\x85"; // 'LATIN CAPITAL LETTER A WITH RING ABOVE' (U+00C5)
|
||||
$char_combining_ring_above = "\xCC\x8A"; // 'COMBINING RING ABOVE' (U+030A)
|
||||
|
@ -97,7 +85,7 @@ echo ( normalizer_is_normalized($char_norm, Normalizer::FORM_C) ) ? "normalized"
|
|||
<example>
|
||||
<title>OO example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<![CDATA[
|
||||
<?php
|
||||
$char_A_ring = "\xC3\x85"; // 'LATIN CAPITAL LETTER A WITH RING ABOVE' (U+00C5)
|
||||
$char_combining_ring_above = "\xCC\x8A"; // 'COMBINING RING ABOVE' (U+030A)
|
||||
|
@ -114,7 +102,7 @@ echo ( Normalizer::isNormalized($char_norm, Normalizer::FORM_C) ) ? "normalized"
|
|||
</example>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
<![CDATA[
|
||||
not normalized; normalized
|
||||
]]>
|
||||
</screen>
|
||||
|
|
|
@ -1,36 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="normalizer.normalize">
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="normalizer.normalize">
|
||||
<refnamediv>
|
||||
<refname>Normalizer::normalize</refname>
|
||||
<refname>normalizer_normalize</refname>
|
||||
<refpurpose>Normalizes the input provided and returns the normalized string</refpurpose>
|
||||
<refpurpose>
|
||||
Normalizes the input provided and returns the normalized string
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>
|
||||
Object oriented style
|
||||
</para>
|
||||
<methodsynopsis>
|
||||
<modifier>static</modifier>
|
||||
<type>string</type>
|
||||
<methodname>Normalizer::normalize</methodname>
|
||||
<methodparam><type>string</type><parameter>input</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>form</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Procedural style
|
||||
</para>
|
||||
<para>Object oriented style</para>
|
||||
<methodsynopsis>
|
||||
<modifier>static</modifier>
|
||||
<type>string</type>
|
||||
<methodname>Normalizer::normalize</methodname>
|
||||
<methodparam><type>string</type><parameter>input</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>form</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Procedural style</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type>
|
||||
<methodname>normalizer_normalize</methodname>
|
||||
<methodparam><type>string</type><parameter>input</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>form</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Normalizes the input provided and returns the normalized <type>string</type>
|
||||
</para>
|
||||
<para>Normalizes the input provided and returns the normalized string</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
|
@ -40,25 +36,14 @@
|
|||
<varlistentry>
|
||||
<term><parameter>input</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string to normalize
|
||||
</para>
|
||||
<para>The input string to normalize</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>form</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
One of the normalization forms
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>options</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Normalization options
|
||||
</para>
|
||||
<para>One of the normalization forms. If not provided the default is
|
||||
Normalizer::FORM_C.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
@ -68,17 +53,17 @@
|
|||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The normalized string or &null; if an error occurred.
|
||||
</para>
|
||||
<para>The normalized string or &null; if an error occurred.</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>normalizer_normalize</function> example</title>
|
||||
<title>
|
||||
<function>normalizer_normalize</function> example
|
||||
</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<![CDATA[
|
||||
<?php
|
||||
$char_A_ring = "\xC3\x85"; // 'LATIN CAPITAL LETTER A WITH RING ABOVE' (U+00C5)
|
||||
$char_combining_ring_above = "\xCC\x8A"; // 'COMBINING RING ABOVE' (U+030A)
|
||||
|
@ -96,7 +81,7 @@ echo urlencode($char_2);
|
|||
<example>
|
||||
<title>OO example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<![CDATA[
|
||||
<?php
|
||||
$char_A_ring = "\xC3\x85"; // 'LATIN CAPITAL LETTER A WITH RING ABOVE' (U+00C5)
|
||||
$char_combining_ring_above = "\xCC\x8A"; // 'COMBINING RING ABOVE' (U+030A)
|
||||
|
@ -113,7 +98,7 @@ echo urlencode($char_2);
|
|||
</example>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
<![CDATA[
|
||||
%C3%85 %C3%85
|
||||
]]>
|
||||
</screen>
|
||||
|
|
Loading…
Reference in a new issue