mirror of
https://github.com/php/doc-ja.git
synced 2026-03-24 15:12:22 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/ja/trunk@330045 c90b9560-bf6c-de11-be94-00142212c4b1
137 lines
3.6 KiB
XML
137 lines
3.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: fa5ef560a6ea59e32de1e383969ac728526a1335 Maintainer: takagi 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>ファイルのアドバイザリ・ロック</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>
|
|
このメソッドは、<function>flock</function> に対応してコールされます。また
|
|
<function>file_put_contents</function> (<parameter>flags</parameter>
|
|
が <constant>LOCK_EX</constant> を含む場合)、
|
|
<function>stream_set_blocking</function> がコールされたときやストリームを閉じるとき
|
|
(<constant>LOCK_UN</constant>) にもコールされます。
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>operation</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
<parameter>operation</parameter> は以下のいずれかとなります。
|
|
<itemizedlist>
|
|
<listitem>
|
|
<simpara>
|
|
<constant>LOCK_SH</constant> 共有ロック (読み込み) を確保します。
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
<constant>LOCK_EX</constant> 排他ロック (書き込み) を確保します。
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
<constant>LOCK_UN</constant> ロック (共有あるいは排他) を開放します。
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
<constant>LOCK_NB</constant>
|
|
<function>flock</function> によるロック中にブロックしない
|
|
(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>
|
|
このメソッドのコールに失敗した場合 (実装されていないなど) は <constant>E_WARNING</constant> を発行します。
|
|
</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
|
|
-->
|