Flow PHP

Path

Read onlyYes
FinalYes

Methods

__construct()  : mixed
addPartitions()  : self
basename()  : string
basenamePrefix()  : self
context()  : ResourceContext
endsWith()  : bool
extension()  : string|false
extractPlaceholderPartitions()  : Partitions
Extracts partitions from a concrete path by matching it against partition placeholders in this path.
filename()  : string
from()  : self
getOption()  : string|int|bool|float|UnitEnum|null
glob()  : string
Path with partition placeholders replaced by glob wildcards, suitable for glob-based listing.
hasOption()  : bool
isEqual()  : bool
isLocal()  : bool
isPattern()  : bool
matches()  : bool
options()  : array<string, null|bool|float|int|string|UnitEnum>
parentDirectory()  : self
partitionPlaceholders()  : array<string|int, string>
partitions()  : Partitions
partitionsPaths()  : array<string|int, Path>
path()  : string
Difference between Path::uri and Path::path is that Path::uri returns path with scheme and Path::path returns path without scheme.
protocol()  : string
randomize()  : self
realpath()  : self
Turn relative path into absolute paths even when path does not exists or it's glob pattern.
rootDirectoryName()  : string|null
setExtension()  : self
setOption()  : self
setOptionWhenEmpty()  : self
skipDirectories()  : self|null
staticPart()  : self
suffix()  : self
uri()  : string
Difference between Path::uri and Path::path is that Path::uri returns path with scheme and Path::path returns path without scheme.
withPartitions()  : self
Attach explicit partitions to the path, merged with partitions parsed from the path itself.

Methods

basename()

public basename() : string
Return values
string

basenamePrefix()

public basenamePrefix(string $prefix) : self
Parameters
$prefix : string
Return values
self

endsWith()

public endsWith(string $string) : bool
Parameters
$string : string
Return values
bool

extension()

public extension() : string|false
Return values
string|false

extractPlaceholderPartitions()

Extracts partitions from a concrete path by matching it against partition placeholders in this path.

public extractPlaceholderPartitions(self $path) : Partitions
Parameters
$path : self
Return values
Partitions

filename()

public filename() : string
Return values
string

from()

public static from(string $uri[, array<string|int, null|bool|float|int|string|UnitEnum>|Options $options = [] ]) : self
Parameters
$uri : string
$options : array<string|int, null|bool|float|int|string|UnitEnum>|Options = []
Return values
self

getOption()

public getOption(string|Option $option[, string|int|bool|float|UnitEnum|null $default = null ]) : string|int|bool|float|UnitEnum|null
Parameters
$option : string|Option
$default : string|int|bool|float|UnitEnum|null = null
Return values
string|int|bool|float|UnitEnum|null

glob()

Path with partition placeholders replaced by glob wildcards, suitable for glob-based listing.

public glob() : string
Return values
string

hasOption()

public hasOption(string|Option $option) : bool
Parameters
$option : string|Option
Return values
bool

isEqual()

public isEqual(self $path) : bool
Parameters
$path : self
Return values
bool

isLocal()

public isLocal() : bool
Return values
bool

isPattern()

public isPattern() : bool
Return values
bool

matches()

public matches(self $path) : bool
Parameters
$path : self
Return values
bool

options()

public options() : array<string, null|bool|float|int|string|UnitEnum>
Return values
array<string, null|bool|float|int|string|UnitEnum>

parentDirectory()

public parentDirectory() : self
Return values
self

partitionPlaceholders()

public partitionPlaceholders() : array<string|int, string>
Return values
array<string|int, string>

partitionsPaths()

public partitionsPaths() : array<string|int, Path>
Return values
array<string|int, Path>

path()

Difference between Path::uri and Path::path is that Path::uri returns path with scheme and Path::path returns path without scheme.

public path() : string
Return values
string

protocol()

public protocol() : string
Return values
string

randomize()

public randomize() : self
Return values
self

realpath()

Turn relative path into absolute paths even when path does not exists or it's glob pattern.

public static realpath(string $path[, array<string, null|bool|float|int|string|UnitEnum>|Options $options = [] ]) : self
Parameters
$path : string
$options : array<string, null|bool|float|int|string|UnitEnum>|Options = []
Tags
throws
RuntimeException
Return values
self

rootDirectoryName()

public rootDirectoryName() : string|null
Return values
string|null

setExtension()

public setExtension(string $extension) : self
Parameters
$extension : string
Return values
self

setOption()

public setOption(string|Option $option, string|int|bool|float|UnitEnum|null $value) : self
Parameters
$option : string|Option
$value : string|int|bool|float|UnitEnum|null
Return values
self

setOptionWhenEmpty()

public setOptionWhenEmpty(string|Option $option, string|int|bool|float|UnitEnum|null $value) : self
Parameters
$option : string|Option
$value : string|int|bool|float|UnitEnum|null
Return values
self

skipDirectories()

public skipDirectories(int $count) : self|null
Parameters
$count : int
Return values
self|null

staticPart()

public staticPart() : self
Return values
self

suffix()

public suffix(string $string) : self
Parameters
$string : string
Return values
self

uri()

Difference between Path::uri and Path::path is that Path::uri returns path with scheme and Path::path returns path without scheme.

public uri() : string
Return values
string

withPartitions()

Attach explicit partitions to the path, merged with partitions parsed from the path itself.

public withPartitions(Partitions $partitions) : self

Used to carry partitions extracted from partition placeholders on concrete, listed paths.

Parameters
$partitions : Partitions
Return values
self
On this page

Search results