downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

SplFileInfo::__toString> <SplFileInfo::setFileClass
[edit] Last updated: Fri, 24 Jun 2011

view this page in

SplFileInfo::setInfoClass

(PHP 5 >= 5.1.2)

SplFileInfo::setInfoClassتعیین کلاس استفاده به همراه getFileInfo و getPathInfo

Description

public void SplFileInfo::setInfoClass ([ string $class_name ] )

استفاده از این متد برای تعیین کلاس سفارشی استفاده شده به وسیله getFileInfo و getPathInfo. نام کلاس ارسالی به این متد از SplFileInfo مشتق شده است.

Parameters

class_name

نام کلاس برای استفاده.

Return Values

No value is returned.

Examples

Example #1 مثال SplFileInfo::setFileClass()

<?php
// Define a class which extends SplFileInfo
class MyFoo extends SplFileInfo {}

$info = new SplFileInfo('foo');
// Set the class name to use
$info->setInfoClass('MyFoo');
var_dump($info->getFileInfo());
?>

The above example will output something similar to:

object(MyFoo)#2 (0) { } 

See Also



add a note add a note User Contributed Notes SplFileInfo::setInfoClass - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites