mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-23 22:52:12 +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>
136 lines
3.4 KiB
XML
136 lines
3.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: fa5ef560a6ea59e32de1e383969ac728526a1335 Maintainer: leonardolara Status: ready -->
|
|
|
|
<refentry xml:id="streamwrapper.stream-lock" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>streamWrapper::stream_lock</refname>
|
|
<refpurpose>Travamento de aviso para arquivos</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>bool</type><methodname>streamWrapper::stream_lock</methodname>
|
|
<methodparam><type>int</type><parameter>operation</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Este método é chamado em resposta a <function>flock</function>, em
|
|
<function>file_put_contents</function> (quando <parameter>flags</parameter>
|
|
contiver <constant>LOCK_EX</constant>), em
|
|
<function>stream_set_blocking</function> e no fechamento do fluxo
|
|
(<constant>LOCK_UN</constant>).
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>operation</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
<parameter>operation</parameter> pode ser um dos seguintes:
|
|
<itemizedlist>
|
|
<listitem>
|
|
<simpara>
|
|
<constant>LOCK_SH</constant> para obter uma trava compartilhada (leitura).
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
<constant>LOCK_EX</constant> para obter uma trava exclusiva (escrita).
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
<constant>LOCK_UN</constant> para liberar uma trava (compartilhada ou exclusiva).
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
<constant>LOCK_NB</constant> se não for desejado que
|
|
<function>flock</function> bloqueie durante a trava.
|
|
(não suportado no Windows)
|
|
</simpara>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors"><!-- {{{ -->
|
|
&reftitle.errors;
|
|
<para>
|
|
Emite um aviso <constant>E_WARNING</constant> se a chamada a este método falhar (ex.: não implementado).
|
|
</para>
|
|
</refsect1><!-- }}} -->
|
|
|
|
|
|
<!--
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>streamWrapper::stream_lock</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
/* ... */
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
...
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
-->
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>stream_set_blocking</function></member>
|
|
<member><function>flock</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
|
|
-->
|