mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Added SplFileInfo::getExtension() doc (closes #48767)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@308265 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
3a8a2c895a
commit
1b914e8ccf
2 changed files with 93 additions and 0 deletions
92
reference/spl/splfileinfo/getextension.xml
Normal file
92
reference/spl/splfileinfo/getextension.xml
Normal file
|
@ -0,0 +1,92 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="splfileinfo.getextension" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SplFileInfo::getExtension</refname>
|
||||
<refpurpose>Gets the file extension</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>string</type><methodname>SplFileInfo::getExtension</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Retrieves the file extension.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a <type>string</type> containing the file extension, or an
|
||||
empty <type>string</type> if the file has no extension.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title><function>SplFileInfo::getExtension</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$info = new SplFileInfo('foo.txt');
|
||||
var_dump($info->getExtension());
|
||||
|
||||
$info = new SplFileInfo('photo.jpg');
|
||||
var_dump($info->getExtension());
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
string(3) "txt"
|
||||
string(3) "jpg"
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><methodname>SplFileInfo::getFilename</methodname></member>
|
||||
<member><methodname>SplFileInfo::getBasename</methodname></member>
|
||||
<member><function>pathinfo</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
|
@ -465,6 +465,7 @@
|
|||
<function name='splfileinfo::getatime' from='PHP 5 >= 5.1.2'/>
|
||||
<function name='splfileinfo::getbasename' from='PHP 5 >= 5.2.2'/>
|
||||
<function name='splfileinfo::getctime' from='PHP 5 >= 5.1.2'/>
|
||||
<function name='splfileinfo::getextension' from='PHP 5 >= 5.3.6'/>
|
||||
<function name='splfileinfo::getfileinfo' from='PHP 5 >= 5.1.2'/>
|
||||
<function name='splfileinfo::getfilename' from='PHP 5 >= 5.1.2'/>
|
||||
<function name='splfileinfo::getgroup' from='PHP 5 >= 5.1.2'/>
|
||||
|
|
Loading…
Reference in a new issue