LocalPath

class \TYPO3\CMS\Core\Resource\LocalPath

Model representing an absolute or relative path in the local file system

Table of Contents

Constants

TYPE_ABSOLUTE  : mixed = 1
TYPE_RELATIVE  : mixed = 2

Properties

$absolute  : string
$raw  : string
$relative  : string|null
$type  : int

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

$relative

protected string|null $relative = null

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

bool

isRelative()

public isRelative() : bool

Return values

bool
On this page