Bitrix API

Path extends Path

Table of Contents

Constants

DIRECTORY_SEPARATOR  = '/'
INVALID_FILENAME_BYTES  = "‮"
INVALID_FILENAME_CHARS  = "\\/:*?\"'<>|~#&;"

Methods

addLangId()  : string
Adds language folder and code into path.
checkCreatePath()  : bool
Checks existence or creates of the directory path.
combine()  : mixed
convertLogicalToPhysical()  : mixed
convertLogicalToUri()  : mixed
convertPhysicalToLogical()  : mixed
convertPhysicalToUri()  : mixed
convertRelativeToAbsolute()  : mixed
convertSiteRelativeToAbsolute()  : mixed
convertUriToPhysical()  : mixed
extractLangId()  : string|null
Detects and returns language code from a path.
getDirectory()  : mixed
getExtension()  : mixed
getName()  : mixed
isAbsolute()  : mixed
isLangDir()  : bool
Checks if it is translation folder.
isPhpFile()  : bool
Checks if it is php file.
normalize()  : mixed
randomizeInvalidFilename()  : string
removeLangId()  : string
Removes language folder and code from path.
replaceInvalidFilename()  : string
replaceLangId()  : string
Replaces language code in the path.
secure()  : string
Removes unsecured path parts.
tidy()  : string
Normalizes path splitter symbols.
validate()  : mixed
validateFilename()  : mixed

Constants

DIRECTORY_SEPARATOR

public mixed DIRECTORY_SEPARATOR = '/'

INVALID_FILENAME_BYTES

public mixed INVALID_FILENAME_BYTES = "‮"

INVALID_FILENAME_CHARS

public mixed INVALID_FILENAME_CHARS = "\\/:*?\"'<>|~#&;"

Methods

addLangId()

Adds language folder and code into path.

public static addLangId(string $path, string $langId[, array<string|int, string> $langs = null ]) : string
Parameters
$path : string

Path to check.

$langId : string

Language code to add.

$langs : array<string|int, string> = null

Languages list.

Return values
string

checkCreatePath()

Checks existence or creates of the directory path.

public static checkCreatePath(string $path) : bool
Parameters
$path : string

Path to check.

Return values
bool

combine()

public static combine(mixed ...$args) : mixed
Parameters
$args : mixed

convertLogicalToPhysical()

public static convertLogicalToPhysical(mixed $path) : mixed
Parameters
$path : mixed

convertLogicalToUri()

public static convertLogicalToUri(mixed $path) : mixed
Parameters
$path : mixed

convertPhysicalToLogical()

public static convertPhysicalToLogical(mixed $path) : mixed
Parameters
$path : mixed

convertPhysicalToUri()

public static convertPhysicalToUri(mixed $path) : mixed
Parameters
$path : mixed

convertRelativeToAbsolute()

public static convertRelativeToAbsolute(mixed $relativePath) : mixed
Parameters
$relativePath : mixed

convertSiteRelativeToAbsolute()

public static convertSiteRelativeToAbsolute(mixed $relativePath[, mixed $site = null ]) : mixed
Parameters
$relativePath : mixed
$site : mixed = null

convertUriToPhysical()

public static convertUriToPhysical(mixed $path) : mixed
Parameters
$path : mixed

extractLangId()

Detects and returns language code from a path.

public static extractLangId(string $path) : string|null
Parameters
$path : string

Path to check.

Return values
string|null

getDirectory()

public static getDirectory(mixed $path) : mixed
Parameters
$path : mixed

getExtension()

public static getExtension(mixed $path) : mixed
Parameters
$path : mixed

getName()

public static getName(mixed $path) : mixed
Parameters
$path : mixed

isAbsolute()

public static isAbsolute(mixed $path) : mixed
Parameters
$path : mixed

isLangDir()

Checks if it is translation folder.

public static isLangDir(string $path[, bool $additionalCheck = false ]) : bool
Parameters
$path : string

Path to check.

$additionalCheck : bool = false

Preforms additional check.

Return values
bool

isPhpFile()

Checks if it is php file.

public static isPhpFile(string $path[, bool $checkExistence = false ]) : bool
Parameters
$path : string

Path to check.

$checkExistence : bool = false
Return values
bool

normalize()

public static normalize(mixed $path) : mixed
Parameters
$path : mixed

randomizeInvalidFilename()

public static randomizeInvalidFilename(string $filename) : string
Parameters
$filename : string
Return values
string

removeLangId()

Removes language folder and code from path.

public static removeLangId(string $path[, array<string|int, string> $langs = null ]) : string
Parameters
$path : string

Path to check.

$langs : array<string|int, string> = null

Languages list.

Return values
string

replaceInvalidFilename()

public static replaceInvalidFilename(string $filename, callable $callback) : string
Parameters
$filename : string
$callback : callable
Return values
string

replaceLangId()

Replaces language code in the path.

public static replaceLangId(string $path, string $langId) : string
Parameters
$path : string

Path to check.

$langId : string

Language code to add.

Return values
string

secure()

Removes unsecured path parts.

public static secure(string $path) : string
Parameters
$path : string

Path to check.

Return values
string

tidy()

Normalizes path splitter symbols.

public static tidy(string $path) : string
Parameters
$path : string

Path to check.

Return values
string

validate()

public static validate(mixed $path) : mixed
Parameters
$path : mixed

validateFilename()

public static validateFilename(mixed $filename) : mixed
Parameters
$filename : mixed

        
On this page

Search results