Documentation

FileId
in package

Utility class for converting file paths into repository resource identifiers.

Tags
author

zozlak

Table of Contents

Constants

ENC_UTF8  = 'utf-8'

Properties

$defaultDirLen  : int
$idPrefix  : string
$pathEncoding  : string
Detected operating system path enconding.

Methods

__construct()  : mixed
getId()  : string
getDirLen()  : int
pathToUtf8()  : string
Tries to detect path encoding used by the operating system.

Constants

ENC_UTF8

private mixed ENC_UTF8 = 'utf-8'

Properties

$defaultDirLen

private int $defaultDirLen

$idPrefix

private string $idPrefix

$pathEncoding

Detected operating system path enconding.

private static string $pathEncoding = ''

Methods

__construct()

public __construct(string $idPrefix[, string $defaultDir = '' ]) : mixed
Parameters
$idPrefix : string
$defaultDir : string = ''

getId()

public getId(SplFileInfo|string $path[, string|null $directory = null ]) : string
Parameters
$path : SplFileInfo|string
$directory : string|null = null
Return values
string

getDirLen()

private getDirLen(string $dir) : int
Parameters
$dir : string
Return values
int

pathToUtf8()

Tries to detect path encoding used by the operating system.

private static pathToUtf8(string $path) : string
Parameters
$path : string
Tags
throws
RuntimeException
Return values
string

        
On this page

Search results