Files
php-doc-ru/reference/intl/collator/sort-with-sort-keys.xml
Sergey Panteleev 6d43fd64d7 Исправление форматирования
[skip-spellcheck]
[skip-lint]
2022-12-27 03:42:36 +03:00

124 lines
3.4 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 1976eae0d815797af97a1e16c5cd90ffc2868395 Maintainer: sergey Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="collator.sortwithsortkeys" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Collator::sortWithSortKeys</refname>
<refname>collator_sort_with_sort_keys</refname>
<refpurpose>Сортирует массив с использованием указанного Collator и ключей сортировки</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>
&style.oop;
</para>
<methodsynopsis role="Collator">
<modifier>public</modifier> <type>bool</type><methodname>Collator::sortWithSortKeys</methodname>
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
</methodsynopsis>
<para>
&style.procedural;
</para>
<methodsynopsis>
<type>bool</type><methodname>collator_sort_with_sort_keys</methodname>
<methodparam><type>Collator</type><parameter>object</parameter></methodparam>
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
</methodsynopsis>
<para>
То же, что и <function>collator_sort</function>, но использует ключи сортировки ICU,
созданные ucol_getSortKey() для увеличения скорости работы с большими массивами.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>object</parameter></term>
<listitem>
<para>
Объект <classname>Collator</classname>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>array</parameter></term>
<listitem>
<para>Массив строк для сортировки</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></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></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
-->