eloquent/pathogen API
Class

Eloquent\Pathogen\FileSystem\FileSystemPath

abstract class FileSystemPath extends Path

A static utility class for constructing file system paths.

This class utilizes a path factory that produces file system paths by inspecting the supplied string, and determining the most suitable path type to use.

Do not use this class in type hints; use FileSystemPathInterface instead.

Methods

static PathInterface fromString(string $path)

Creates a new path instance from its string representation.

from Path
static PathInterface fromAtoms(mixed<string> $atoms, boolean|null $isAbsolute = null, boolean|null $hasTrailingSeparator = null)

Creates a new path instance from a set of path atoms.

from Path

Details

in Path at line 28
static public PathInterface fromString(string $path)

Creates a new path instance from its string representation.

Parameters

string $path The string representation of the path.

Return Value

PathInterface The newly created path instance.

in Path at line 43
static public PathInterface fromAtoms(mixed<string> $atoms, boolean|null $isAbsolute = null, boolean|null $hasTrailingSeparator = null)

Creates a new path instance from a set of path atoms.

Parameters

mixed<string> $atoms The path atoms.
boolean|null $isAbsolute True if the path is absolute.
boolean|null $hasTrailingSeparator True if the path has a trailing separator.

Return Value

PathInterface The newly created path instance.

Exceptions

InvalidPathAtomExceptionInterface If any of the supplied atoms are invalid.