mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-24 07:02:09 +01:00
130 lines
3.2 KiB
XML
130 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: d51166ca16fda8e766849505b84f9306ef443f71 Maintainer: fernandowobeto Status: ready --><!-- CREDITS: fernandowobeto -->
|
|
<refentry xml:id="directoryiterator.construct" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>DirectoryIterator::__construct</refname>
|
|
<refpurpose>Constrói um novo iterador de diretório a partir de um caminho</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<constructorsynopsis role="DirectoryIterator">
|
|
<modifier>public</modifier> <methodname>DirectoryIterator::__construct</methodname>
|
|
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
|
|
</constructorsynopsis>
|
|
|
|
<para>
|
|
Constrói um novo iterador de diretório a partir de um caminho.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>directory</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
O caminho do diretório a ser percorrido.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
Lança um <classname>UnexpectedValueException</classname>
|
|
se o <parameter>directory</parameter> não existir.
|
|
</para>
|
|
<para>
|
|
Lança um <classname>ValueError</classname>
|
|
se o <parameter>directory</parameter> for uma string vazia.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>8.0.0</entry>
|
|
<entry>
|
|
Agora Lança um <classname>ValueError</classname> se
|
|
<parameter>directory</parameter> for uma string vazia;
|
|
anteriormente, lançava um <classname>RuntimeException</classname>.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Um exemplo de <methodname>DirectoryIterator::__construct</methodname></title>
|
|
<para>
|
|
Este exemplo listará o conteúdo do diretório que contém o script.
|
|
</para>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$dir = new DirectoryIterator(dirname(__FILE__));
|
|
foreach ($dir as $fileinfo) {
|
|
if (!$fileinfo->isDot()) {
|
|
var_dump($fileinfo->getFilename());
|
|
}
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><classname>SplFileInfo</classname></member>
|
|
<member><classname>Iterator</classname></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
|
|
-->
|