svn: /phpdoc/en/trunk/ appendices/migration70/new-functions.xml reference/info/functions/get-resources.xml reference/info/versions.xml

From: Date: Mon, 21 Sep 2015 12:17:49 +0000
Subject: svn: /phpdoc/en/trunk/ appendices/migration70/new-functions.xml reference/info/functions/get-resources.xml reference/info/versions.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-13758@lists.php.net to get a copy of this message
aharvey Mon, 21 Sep 2015 12:17:49 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=337879 Log: Add get_resources() documentation. Changed paths: U phpdoc/en/trunk/appendices/migration70/new-functions.xml A phpdoc/en/trunk/reference/info/functions/get-resources.xml U phpdoc/en/trunk/reference/info/versions.xml Modified: phpdoc/en/trunk/appendices/migration70/new-functions.xml =================================================================== --- phpdoc/en/trunk/appendices/migration70/new-functions.xml 2015-09-21 12:17:43 UTC (rev 337878) +++ phpdoc/en/trunk/appendices/migration70/new-functions.xml 2015-09-21 12:17:49 UTC (rev 337879) @@ -102,6 +102,11 @@ <function>gc_mem_caches</function> </simpara> </listitem> + <listitem> + <simpara> + <function>get_resources</function> + </simpara> + </listitem> </itemizedlist> </sect2> Added: phpdoc/en/trunk/reference/info/functions/get-resources.xml =================================================================== --- phpdoc/en/trunk/reference/info/functions/get-resources.xml (rev 0) +++ phpdoc/en/trunk/reference/info/functions/get-resources.xml 2015-09-21 12:17:49 UTC (rev 337879) @@ -0,0 +1,137 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision$ --> +<refentry xml:id="function.get-resources" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>get_resources</refname> + <refpurpose>Returns active resources</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>array</type><methodname>get_resources</methodname> + <methodparam choice="opt"><type>string</type><parameter>type</parameter></methodparam> + </methodsynopsis> + <para> + Returns an array of all currently active <type>resource</type>s, optionally + filtered by resource type. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>type</parameter></term> + <listitem> + <para> + If defined, this will cause <function>get_resources</function> to only + return resources of the given type. + <link linkend="resource">A list of resource types is available.</link> + </para> + <para> + If the <type>string</type> <literal>Unknown</literal> is provided as + the type, then only resources that are of an unknown type will be + returned. + </para> + <para> + If omitted, all resources will be returned. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns an <type>array</type> of currently active resources, indexed by + resource number. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Unfiltered <function>get_resources</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$fp = tmpfile(); +var_dump(get_resources()); +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +array(1) { + [1]=> + resource(1) of type (stream) +} +]]> + </screen> + </example> + <example> + <title>Filtered <function>get_resources</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$fp = tmpfile(); +var_dump(get_resources('stream')); +var_dump(get_resources('curl')); +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +array(1) { + [1]=> + resource(1) of type (stream) +} +array(0) { +} +]]> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>get_loaded_extensions</function></member> + <member><function>get_defined_constants</function></member> + <member><function>get_defined_functions</function></member> + <member><function>get_defined_vars</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 +--> Modified: phpdoc/en/trunk/reference/info/versions.xml =================================================================== --- phpdoc/en/trunk/reference/info/versions.xml 2015-09-21 12:17:43 UTC (rev 337878) +++ phpdoc/en/trunk/reference/info/versions.xml 2015-09-21 12:17:49 UTC (rev 337879) @@ -23,6 +23,7 @@ <function name='get_include_path' from='PHP 4 &gt;= 4.3.0, PHP 5'/> <function name='get_included_files' from='PHP 4, PHP 5'/> <function name='get_required_files' from='PHP 4, PHP 5'/> + <function name='get_resources' from='PHP 7'/> <function name='get_loaded_extensions' from='PHP 4, PHP 5'/> <function name='get_magic_quotes_gpc' from='PHP 4, PHP 5'/> <function name='get_magic_quotes_runtime' from='PHP 4, PHP 5'/>

« previous php.doc.cvs (#13758) next »