mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Documented this method as it previously contained ~all docgen generated text.
This commit includes changes to the methodsynopsis (added initializers). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@276821 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
165acdaa25
commit
ecaa222524
1 changed files with 34 additions and 19 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
|
||||
<refentry xml:id="splfileinfo.openfile" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
|
@ -11,12 +11,16 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>SplFileObject</type><methodname>SplFileInfo::openFile</methodname>
|
||||
<methodparam choice="opt"><type>string</type><parameter>open_mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>open_mode</parameter><initializer>r</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter><initializer>false</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>resource</type><parameter>context</parameter><initializer>null</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The method description goes here.
|
||||
Creates an <classname>SplFileObject</classname> <type>object</type> of
|
||||
the file. This is useful because <classname>SplFileObject</classname>
|
||||
contains additional methods for manipulating the file whereas
|
||||
<classname>SplFileInfo</classname> is only useful for gaining information,
|
||||
like whether the file is writable.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -28,7 +32,9 @@
|
|||
<term><parameter>open_mode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Description...
|
||||
The mode for opening the file. See the <function>fopen</function>
|
||||
documentation for descriptions of possible modes. The default
|
||||
is read only.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -36,7 +42,7 @@
|
|||
<term><parameter>use_include_path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Description...
|
||||
¶meter.use_include_path;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -44,19 +50,26 @@
|
|||
<term><parameter>context</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Description...
|
||||
¶meter.context;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Description...
|
||||
The opened file as an <classname>SplFileObject</classname> <type>object</type>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="errors">
|
||||
&reftitle.errors;
|
||||
<para>
|
||||
A <classname>RuntimeException</classname> if the file cannot be
|
||||
opened (e.g. insufficient access rights).
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -64,20 +77,21 @@
|
|||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>SplFileInfo::openFile</function> example</title>
|
||||
<title><methodname>SplFileInfo::openFile</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* ... */
|
||||
$fileinfo = new SplFileInfo('/tmp/foo.txt');
|
||||
|
||||
if ($fileinfo->isWritable()) {
|
||||
|
||||
$fileobj = $fileinfo->openFile('a');
|
||||
|
||||
$fileobj->fwrite("appended this sample text");
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
...
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -86,8 +100,9 @@
|
|||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member>SplFileObject</member>
|
||||
<member><classname>SplFileObject</classname></member>
|
||||
<member><function>stream_context_create</function></member>
|
||||
<member><function>fopen</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
|
Loading…
Reference in a new issue