mirror of
https://github.com/php/doc-es.git
synced 2026-03-28 01:12:20 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@334774 c90b9560-bf6c-de11-be94-00142212c4b1
114 lines
2.8 KiB
XML
114 lines
2.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 14af302c9c0e561fa6f9cdd956268758ba9a89c5 Maintainer: andresdzphp Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xml:id="recursiveregexiterator.getchildren" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>RecursiveRegexIterator::getChildren</refname>
|
|
<refpurpose>Devuelve un iterador para la entrada actual</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>RecursiveRegexIterator</type><methodname>RecursiveRegexIterator::getChildren</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
Devuelve un iterador para la entrada actual.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
&no.function.parameters;
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Un iterador para la entrada actual, si este puede se puede iterar sobre el iterador interno.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
Se lanza una <classname>InvalidArgumentException</classname>
|
|
si la entrada actual no contiene un valor que pueda ser iterado sobre el iterador
|
|
interno.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Ejemplo de <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()) {
|
|
|
|
// imprime todos los hijos
|
|
echo "Hijos: ";
|
|
foreach ($rRegexIterator->getChildren() as $key => $value) {
|
|
echo $value . " ";
|
|
}
|
|
echo "\n";
|
|
} else {
|
|
echo "No tiene hijos\n";
|
|
}
|
|
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
No tiene hijos
|
|
Hijos: 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
|
|
-->
|