Directory
extends DirectoryIterator
in package
Class \Hoa\Iterator\Directory.
Extending the SPL DirectoryIterator class.
Tags
Table of Contents
Properties
- $_relativePath : string
- Relative path.
- $_splFileInfoClass : string
- SplFileInfo classname.
Methods
- __construct() : mixed
- Constructor.
- current() : mixed
- Current.
- getRelativePath() : string
- Get relative path (if given).
- setRelativePath() : string
- Set relative path.
Properties
$_relativePath
Relative path.
protected
string
$_relativePath
= null
$_splFileInfoClass
SplFileInfo classname.
protected
string
$_splFileInfoClass
= null
Methods
__construct()
Constructor.
public
__construct(string $path[, string $splFileInfoClass = null ]) : mixed
Please, see \DirectoryIterator::__construct() method. We add the $splFileInfoClass parameter.
Parameters
- $path : string
-
Path.
- $splFileInfoClass : string = null
-
SplFileInfo classname.
current()
Current.
public
current() : mixed
Please, see \DirectoryIterator::current() method.
getRelativePath()
Get relative path (if given).
public
getRelativePath() : string
Return values
stringsetRelativePath()
Set relative path.
protected
setRelativePath(mixed $path) : string
Parameters
- $path : mixed