mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-24 07:02:09 +01:00
* Updates to abandoned/outdated pages in reference/array/functions/ * Updates to outdated/abandoned pages and new translations in reference/classobj/ * Updates to abandoned/outdated pages in reference/ctype/ * Correction to double-byte UTF-8 character which is similar to 'E' * Correction of translation * Updates to abandoned/outdated files and new translations in reference/dir/ * Updates to abandoned/outdated files in reference/mysqli/ * New translation of reference/sockets/functions/socket-atmark.xml * New translation of reference/stream/* * Corrections after QA scripts * Delete reference/stream/versions.xml Arquivo marcado para não tradução. --------- Co-authored-by: LEONARDO LARA RODRIGUES <leonardolara@github.com> Co-authored-by: alfsb <alfsb@users.noreply.github.com>
181 lines
5.1 KiB
XML
181 lines
5.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: a6afc9550480ad7aba8ab72d0286bd1b9ff41b04 Maintainer: leonardolara Status: ready -->
|
|
|
|
<refentry xml:id="streamwrapper.stream-open" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>streamWrapper::stream_open</refname>
|
|
<refpurpose>Abre arquivo ou URL</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>bool</type><methodname>streamWrapper::stream_open</methodname>
|
|
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>mode</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>options</parameter></methodparam>
|
|
<methodparam><type class="union"><type>string</type><type>null</type></type><parameter role="reference">opened_path</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Este método é chamado imediatamente após o empacotador ser inicializado (por exemplo por
|
|
<function>fopen</function> e <function>file_get_contents</function>).
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>path</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Especifica a URL que foi passada à função original.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
A URL pode ser quebrada em partes com <function>parse_url</function>. Note que apenas URLs
|
|
delimitadas por :// são suportadas. : e :/ são delimitadores tecnicamente válidos, porém não suportados.
|
|
</para>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>mode</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
O modo usado para abrir o arquivo, como detalhado para <function>fopen</function>.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Importante lembrar de verificar se o parâmetro <parameter>mode</parameter> é válido para
|
|
o caminho (<parameter>path</parameter>) requisitado.
|
|
</para>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>options</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Contém opções adicionais definidas pela API de fluxos. Pode conter uma ou mais
|
|
das opcções a seguir somadas (com a operação OR).
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>Opção</entry>
|
|
<entry>Descrição</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry><constant>STREAM_USE_PATH</constant></entry>
|
|
<entry>Se o caminho <parameter>path</parameter> for relativo, a pesquisa
|
|
pelo recurso utilizará include_path.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><constant>STREAM_REPORT_ERRORS</constant></entry>
|
|
<entry>Se esta opção estiver definida, o programador é responsável por emitir
|
|
erros usando <function>trigger_error</function> durante
|
|
abertura do fluxo. Se não estiver definida, o programador
|
|
não deve emitir erros.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>opened_path</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Se o caminho <parameter>path</parameter> for aberto com sucesso,
|
|
e <constant>STREAM_USE_PATH</constant> estiver definida em <parameter>options</parameter>,
|
|
<parameter>opened_path</parameter> deve ser definida para o caminho
|
|
completo do arquivo/recurso que foi realmente aberto.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors"><!-- {{{ -->
|
|
&reftitle.errors;
|
|
&userstream.not.implemented.warning;
|
|
</refsect1><!-- }}} -->
|
|
|
|
|
|
<!-- {{{
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>streamWrapper::stream_open</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
/* ... */
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
...
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
}}}-->
|
|
|
|
<refsect1 role="notes"><!-- {{{ -->
|
|
&reftitle.notes;
|
|
&userstream.updates.context;
|
|
</refsect1><!-- }}} -->
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>fopen</function></member>
|
|
<member><function>parse_url</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
|
|
-->
|