Documentation

Path
in package

Table of Contents

Methods

normalizeLocalFilePath()  : string
Normalize file path for local file system access.
relativeToAbsolutePath()  : string
Convert a relative path to an absolute path

Methods

normalizeLocalFilePath()

Normalize file path for local file system access.

public static normalizeLocalFilePath(string $path) : string

Converts URLs to local file paths when the base path is local. Handles DOCUMENT_ROOT and relative paths.

Parameters
$path : string

File path or URL

Return values
string

Normalized path

relativeToAbsolutePath()

Convert a relative path to an absolute path

public static relativeToAbsolutePath(string $relPath, string $basePath) : string
Parameters
$relPath : string
$basePath : string

The absolute path to prefix to the relative path (can be a path or URL)

Return values
string

        
On this page

Search results