cvs: phpdoc /en/reference/spl/splfileinfo getbasename.xml
| From: | Brett Bieber | Date: | Fri, 14 Nov 2008 19:43:01 +0000 |
| Subject: | cvs: phpdoc /en/reference/spl/splfileinfo getbasename.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-2533@lists.php.net to get a copy of this message | ||
saltybeagle Fri Nov 14 19:43:01 2008 UTC
Modified files:
/phpdoc/en/reference/spl/splfileinfo getbasename.xml
Log:
Document SplFileInfo::getBaseName()
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/spl/splfileinfo/getbasename.xml?r1=1.1&r2=1.2&diff_format=u
Index: phpdoc/en/reference/spl/splfileinfo/getbasename.xml
diff -u phpdoc/en/reference/spl/splfileinfo/getbasename.xml:1.1
phpdoc/en/reference/spl/splfileinfo/getbasename.xml:1.2
--- phpdoc/en/reference/spl/splfileinfo/getbasename.xml:1.1 Fri Nov 14 18:38:21 2008
+++ phpdoc/en/reference/spl/splfileinfo/getbasename.xml Fri Nov 14 19:43:01 2008
@@ -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