mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
- Update to new-doc-style
- The "params" argument is available as of 5.3 git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@257435 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
0f87167980
commit
7d7d82921b
1 changed files with 72 additions and 28 deletions
|
@ -1,39 +1,80 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<refentry xml:id="function.stream-context-create" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>stream_context_create</refname>
|
||||
<refpurpose>Create a streams context</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>resource</type><methodname>stream_context_create</methodname>
|
||||
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter>params</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
<para>
|
||||
Creates and returns a stream context with any options supplied in
|
||||
<parameter>options</parameter> preset.
|
||||
</simpara>
|
||||
<simpara>
|
||||
<parameter>options</parameter> must be an associative
|
||||
array of associative arrays in the format
|
||||
<literal>$arr['wrapper']['option'] = $value</literal>.
|
||||
It defaults to an empty array.
|
||||
</simpara>
|
||||
<simpara>
|
||||
<parameter>params</parameter> must be an associative array
|
||||
in the format <literal>$arr['parameter'] = $value</literal>.
|
||||
Refer to <function>stream_context_set_params</function> for
|
||||
a listing of standard stream parameters.
|
||||
</simpara>
|
||||
<note>
|
||||
<simpara>
|
||||
The <parameter>params</parameter> argument
|
||||
was added to <literal>PHP 6.0.0</literal>.
|
||||
</simpara>
|
||||
</note>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>options</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Must be an associative array of associative arrays in the format
|
||||
<literal>$arr['wrapper']['option'] = $value</literal>.
|
||||
</para>
|
||||
<para>
|
||||
Default to an empty array.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>params</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Must be an associative array in the format
|
||||
<literal>$arr['parameter'] = $value</literal>.
|
||||
Refer to <function>stream_context_set_params</function> for
|
||||
a listing of standard stream parameters.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</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>5.3.0</entry>
|
||||
<entry>
|
||||
Added the optional <parameter>params</parameter> argument.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>Using <function>stream_context_create</function></title>
|
||||
<programlisting role="php">
|
||||
|
@ -58,11 +99,14 @@ fclose($fp);
|
|||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<simpara>
|
||||
See also
|
||||
<function>stream_context_set_option</function>, and
|
||||
Listing of supported wrappers with context options (<xref linkend="wrappers"/>).
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>stream_context_set_option</function></member>
|
||||
<member>Listing of supported wrappers with context options (<xref linkend="wrappers"/>).</member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
|
Loading…
Reference in a new issue