mirror of
https://github.com/php/doc-ru.git
synced 2025-08-15 23:42:35 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/ru/trunk@343995 c90b9560-bf6c-de11-be94-00142212c4b1
117 lines
3.2 KiB
XML
117 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: dd07341fae2c414adc1f700be0890ff32e8daab4 Maintainer: tmn Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="recursiveregexiterator.getchildren" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>RecursiveRegexIterator::getChildren</refname>
|
|
<refpurpose>
|
|
Возвращает итератор для текущего элемента
|
|
</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>RecursiveRegexIterator</type><methodname>RecursiveRegexIterator::getChildren</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
Возвращает итератор для текущего элемента.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
&no.function.parameters;
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Итератор для текущего элемента, если возможна навигация по
|
|
содержимому внутреннего итератора.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
Если внутренний итератор указывает на элемент, который не содержит
|
|
дочерних элементов, будет выброшено исключение
|
|
<classname>InvalidArgumentException</classname>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Пример использования <function>RecursiveRegexIterator::getChildren</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$rArrayIterator = new RecursiveArrayIterator(array('test1', array('tet3', 'test4', 'test5')));
|
|
$rRegexIterator = new RecursiveRegexIterator($rArrayIterator, '/^test/',
|
|
RecursiveRegexIterator::ALL_MATCHES);
|
|
|
|
foreach ($rRegexIterator as $key1 => $value1) {
|
|
|
|
if ($rRegexIterator->hasChildren()) {
|
|
|
|
// выведем все дочерние элементы
|
|
echo "Дочерние элементы: ";
|
|
foreach ($rRegexIterator->getChildren() as $key => $value) {
|
|
echo $value . " ";
|
|
}
|
|
echo "\n";
|
|
} else {
|
|
echo "Нет дочерних элементов\n";
|
|
}
|
|
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
Нет дочерних элементов
|
|
Дочерние элементы: test4 test5
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>RecursiveRegexIterator::hasChildren</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
|
|
-->
|