Path
in package
Value Object for paths.
This can be absolute or relative.
Table of Contents
- $path : string
- __construct() : mixed
- Initializes the path.
- __toString() : string
- returns a string representation of the path.
- dirname() : self
- equals() : bool
- Verifies if another Path object has the same identity as this one.
- isAbsolutePath() : bool
- Returns whether the file path is an absolute path.
Properties
$path
private
string
$path
Methods
__construct()
Initializes the path.
public
__construct(string $path) : mixed
Parameters
- $path : string
Return values
mixed —__toString()
returns a string representation of the path.
public
__toString() : string
Return values
string —dirname()
public
static dirname(Path $input) : self
Parameters
- $input : Path
Return values
self —equals()
Verifies if another Path object has the same identity as this one.
public
equals(self $otherPath) : bool
Parameters
- $otherPath : self
Return values
bool —isAbsolutePath()
Returns whether the file path is an absolute path.
public
static isAbsolutePath(string $file) : bool
Parameters
- $file : string
-
A file path