phpDocumentor

Path
in package
implements Stringable

FinalYes

Value Object for paths.

This can be absolute or relative.

Table of Contents

Interfaces

Stringable

Properties

$path  : string

Methods

__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 read-only

private string $path

Methods

__construct()

Initializes the path.

public __construct(string $path) : mixed
Parameters
$path : string

__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

Return values
bool

        
On this page

Search results