mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Document SplFileInfo::getBaseName()
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@269017 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
363faa0c12
commit
79460c8b57
1 changed files with 15 additions and 16 deletions
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
|
||||
<refentry xml:id="splfileinfo.getbasename" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>SplFileInfo::getBasename</refname>
|
||||
<refpurpose>The getBasename purpose</refpurpose>
|
||||
<refpurpose>Get the base name of the file</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
|
@ -14,7 +14,8 @@
|
|||
<methodparam choice="opt"><type>string</type><parameter>suffix</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The method description goes here.
|
||||
This method returns the base name of the file, directory, or link without
|
||||
path info.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -26,7 +27,7 @@
|
|||
<term><parameter>suffix</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Description...
|
||||
Optional suffix to omit from the base name returned.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -38,7 +39,7 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Description...
|
||||
Returns the base name without path information.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -50,29 +51,27 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* ... */
|
||||
$info = new SplFileInfo('file.txt');
|
||||
var_dump($info->getbaseName());
|
||||
$info = new SplFileInfo('/path/to/file.txt');
|
||||
var_dump($info->getbaseName());
|
||||
$info = new SplFileInfo('/path/to/file.txt');
|
||||
var_dump($info->getbaseName('.txt'));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
...
|
||||
string(8) "file.txt"
|
||||
string(8) "file.txt"
|
||||
string(4) "file"
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>Classname::Method</methodname></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
Loading…
Reference in a new issue