php-doc-en/reference/intl/intlchar/charmirror.xml
Christoph Michael Becker 729d7e8e04 Fix #73626: Example error for INTL extension
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@341231 c90b9560-bf6c-de11-be94-00142212c4b1
2016-11-30 11:34:48 +00:00

104 lines
2.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="intlchar.charmirror" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>IntlChar::charMirror</refname>
<refpurpose>Get the "mirror-image" character for a code point</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <modifier>static</modifier> <type>mixed</type><methodname>IntlChar::charMirror</methodname>
<methodparam><type>mixed</type><parameter>codepoint</parameter></methodparam>
</methodsynopsis>
<para>
Maps the specified character to a "mirror-image" character.
</para>
<para>
For characters with the <emphasis>Bidi_Mirrored</emphasis> property, implementations sometimes need a "poor man's" mapping to another
Unicode character (code point) such that the default glyph may serve as the mirror-image of the default glyph of the
specified character. This is useful for text conversion to and from codepages with visual order, and for displays
without glyph selection capabilities.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>codepoint</parameter></term>
<listitem>
&intl.codepoint.parameter;
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns another Unicode code point that may serve as a mirror-image substitute, or <parameter>codepoint</parameter>
itself if there is no such mapping or <parameter>codepoint</parameter> does not have the
<emphasis>Bidi_Mirrored</emphasis> property.
</para>
&intl.codepoint.return;
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title>&intl.codepoint.example;</title>
<programlisting role="php">
<![CDATA[
<?php
var_dump(IntlChar::charMirror("A"));
var_dump(IntlChar::charMirror("<"));
var_dump(IntlChar::charMirror("("));
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
string(1) "A"
string(1) ">"
string(2) ")"
]]>
</screen>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>IntlChar::isMirrored</function></member>
<member><constant>IntlChar::PROPERTY_BIDI_MIRRORED</constant></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
-->