Documentation

RelativePath
in package
implements RelativePathInterface

Represent and manipulate unixoid paths as immutables.

Tags
TODO

PHP 8.2 baseline: Make readonly

immutable

Interfaces, Classes, Traits and Enums

RelativePathInterface
Represents either an absolute or a relative Path

Table of Contents

$path  : string
TODO PHP 8.1 make readonly
__construct()  : mixed
Constructor.
__toString()  : string
normalize()  : RelativePathInterface
Normalize a path

Properties

$path read-only

TODO PHP 8.1 make readonly

private string $path
Tags
readonly

Methods

__construct()

Constructor.

public __construct(string $path) : mixed

No default on purpose.

use ::fromCurrentDir to get the absolute path to cwd. use '' or './' for the path relative to self

Parameters
$path : string
Tags
throws
ValueError
Return values
mixed

__toString()

public __toString() : string
Return values
string

Search results