eloquent/pathogen API
Class

Eloquent\Pathogen\Windows\Factory\WindowsPathFactory

class WindowsPathFactory extends PathFactory implements WindowsPathFactoryInterface

A path factory that creates Windows path instances.

Methods

static WindowsPathFactoryInterface instance()

Get a static instance of this path factory.

PathInterface create(string $path)

Creates a new path instance from its string representation.

PathInterface createFromAtoms(mixed<string> $atoms, boolean|null $isAbsolute = null, boolean|null $hasTrailingSeparator = null)

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

WindowsPathInterface createFromDriveAndAtoms(mixed<string> $atoms, string|null $drive = null, boolean|null $isAbsolute = null, boolean|null $isAnchored = null, boolean|null $hasTrailingSeparator = null)

Creates a new path instance from a set of path atoms and a drive specifier.

Details

at line 33
static public WindowsPathFactoryInterface instance()

Get a static instance of this path factory.

Return Value

WindowsPathFactoryInterface The static path factory.

at line 51
public PathInterface create(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.

at line 117
public PathInterface createFromAtoms(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.
InvalidPathStateException If the supplied arguments would produce an invalid path.

at line 147
public WindowsPathInterface createFromDriveAndAtoms(mixed<string> $atoms, string|null $drive = null, boolean|null $isAbsolute = null, boolean|null $isAnchored = null, boolean|null $hasTrailingSeparator = null)

Creates a new path instance from a set of path atoms and a drive specifier.

Parameters

mixed<string> $atoms The path atoms.
string|null $drive The drive specifier.
boolean|null $isAbsolute True if the path is absolute.
boolean|null $isAnchored True if the path is anchored to the drive root.
boolean|null $hasTrailingSeparator True if the path has a trailing separator.

Return Value

WindowsPathInterface The newly created path instance.

Exceptions

InvalidPathAtomExceptionInterface If any of the supplied atoms are invalid.
InvalidPathStateException If the supplied arguments would produce an invalid path.