Hoa central
Public Member Functions | Protected Attributes | List of all members
Hoa\Iterator\FileSystem Class Reference
Inheritance diagram for Hoa\Iterator\FileSystem:

Public Member Functions

 __construct ($path, $flags=null, $splFileInfoClass=null)
 
 current ()
 

Protected Attributes

 $_splFileInfoClass = null
 

Detailed Description

Class .

Extending the SPL FileSystemIterator class.

Definition at line 47 of file FileSystem.php.

Constructor & Destructor Documentation

Hoa\Iterator\FileSystem::__construct (   $path,
  $flags = null,
  $splFileInfoClass = null 
)

Constructor. Please, see ::__construct() method. We add the $splFileInfoClass parameter.

Parameters
string$pathPath.
int$flagsFlags.
string$splFileInfoClassSplFileInfo classname.

Definition at line 67 of file FileSystem.php.

68  {
69  $this->_splFileInfoClass = $splFileInfoClass;
70 
71  if (null === $flags) {
72  parent::__construct($path);
73  } else {
74  parent::__construct($path, $flags);
75  }
76 
77  return;
78  }

Member Function Documentation

Hoa\Iterator\FileSystem::current ( )

Current. Please, see ::current() method.

Returns
mixed

Definition at line 86 of file FileSystem.php.

87  {
88  $out = parent::current();
89 
90  if (null !== $this->_splFileInfoClass &&
91  $out instanceof \SplFileInfo) {
92  $out->setInfoClass($this->_splFileInfoClass);
93  $out = $out->getFileInfo();
94  }
95 
96  return $out;
97  }

Member Data Documentation

Hoa\Iterator\FileSystem::$_splFileInfoClass = null
protected

Definition at line 54 of file FileSystem.php.


The documentation for this class was generated from the following file: