mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@330543 c90b9560-bf6c-de11-be94-00142212c4b1
127 lines
3.1 KiB
XML
127 lines
3.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="collator.sortwithsortkeys" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>Collator::sortWithSortKeys</refname>
|
|
<refname>collator_sort_with_sort_keys</refname>
|
|
<refpurpose>Sort array using specified collator and sort keys</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<para>
|
|
&style.oop;
|
|
</para>
|
|
<methodsynopsis>
|
|
<modifier>public</modifier>
|
|
<type>bool</type>
|
|
<methodname>Collator::sortWithSortKeys</methodname>
|
|
<methodparam><type>array</type><parameter role="reference">arr</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
&style.procedural;
|
|
</para>
|
|
<methodsynopsis>
|
|
<type>bool</type>
|
|
<methodname>collator_sort_with_sort_keys</methodname>
|
|
<methodparam><type>Collator</type><parameter>coll</parameter></methodparam>
|
|
<methodparam><type>array</type><parameter role="reference">arr</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Similar to <function>collator_sort</function>
|
|
but uses ICU sorting keys produced by ucol_getSortKey() to gain more speed
|
|
on large arrays.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>coll</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
<classname>Collator</classname> object.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>arr</parameter></term>
|
|
<listitem>
|
|
<para>Array of strings to sort</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>collator_sort_with_sort_keys</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$arr = array( 'Köpfe', 'Kypper', 'Kopfe' );
|
|
$coll = collator_create( 'sv' );
|
|
|
|
collator_sort_with_sort_keys( $coll, $arr );
|
|
var_export( $arr );
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
array (
|
|
0 => 'Kopfe',
|
|
1 => 'Kypper',
|
|
2 => 'Köpfe',
|
|
)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><link linkend="intl.collator-constants"><classname>Collator</classname> constants</link></member>
|
|
<member><function>collator_sort</function></member>
|
|
<member><function>collator_asort</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
|
|
-->
|