LocalPath
class \
Model representing an absolute or relative path in the local file system
Internal
Table of Contents
Constants
- TYPE_ABSOLUTE : mixed = 1
- TYPE_RELATIVE : mixed = 2
Properties
Methods
- __construct() : mixed
- fromDriverConfiguration() : self|null
- Resolves the base path of a local driver configuration: an absolute path is used as is, a relative path with the legacy "pathType" option set to "relative" is resolved against the public path, any other relative path against the project path.
- getAbsolute() : string
- getRaw() : string
- getRelative() : string|null
- isAbsolute() : bool
- isRelative() : bool
Constants
TYPE_ABSOLUTE
public
mixed
TYPE_ABSOLUTE
= 1
TYPE_RELATIVE
public
mixed
TYPE_RELATIVE
= 2
Properties
$absolute
protected
string
$absolute
$raw
protected
string
$raw
$relative
protected
string|null
$relative
= null
$type
protected
int
$type
Methods
__construct()
public
__construct(string $value, int $type) : mixed
Parameters
- $value : string
- $type : int
fromDriverConfiguration()
Resolves the base path of a local driver configuration: an absolute path is used as is, a relative path with the legacy "pathType" option set to "relative" is resolved against the public path, any other relative path against the project path.
public
static fromDriverConfiguration(array $configuration) : self|null
Parameters
- $configuration : array
Return values
self|null —null when the configuration has no base path
getAbsolute()
public
getAbsolute() : string
Return values
string —(calculated) absolute path
getRaw()
public
getRaw() : string
Return values
string —normalized path as provided
getRelative()
public
getRelative() : string|null
Return values
string|null —(calculated) relative path to public path - null if outside public path
isAbsolute()
public
isAbsolute() : bool
Return values
boolisRelative()
public
isRelative() : bool