SplFileInfo class setters allow and default to base class

These methods allow (and default to) the base class. The previous documentation made it seem as if only child classes were accepted as an argument and also did not clarify the default value. That likely resulted in the following HHVM implementation difference: https://github.com/facebook/hhvm/pull/4917


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@336017 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jeremy Mikola 2015-02-27 21:48:00 +00:00
parent 4be6fbeb69
commit cf04609ce5
2 changed files with 6 additions and 4 deletions

View file

@ -11,11 +11,12 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>SplFileInfo::setFileClass</methodname>
<methodparam choice="opt"><type>string</type><parameter>class_name</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>class_name</parameter><initializer>"SplFileObject"</initializer></methodparam>
</methodsynopsis>
<para>
Set the class name which SplFileInfo will use to open files with when openFile() is called.
The class name passed to this method must be derived from SplFileObject.
The class name passed to this method must be SplFileObject or a class derived
from SplFileObject.
</para>
</refsect1>

View file

@ -11,12 +11,13 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>SplFileInfo::setInfoClass</methodname>
<methodparam choice="opt"><type>string</type><parameter>class_name</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>class_name</parameter><initializer>"SplFileInfo"</initializer></methodparam>
</methodsynopsis>
<para>
Use this method to set a custom class which will be used when getFileInfo
and getPathInfo are called.
The class name passed to this method must be derived from SplFileInfo.
The class name passed to this method must be SplFileInfo or a class derived
from SplFileInfo.
</para>
</refsect1>