Documentation

Filename
in package
implements Stringable

Read onlyYes
FinalYes

Valid filename with a restrictive set of caracters allowed.

Table of Contents

Interfaces

Stringable

Constants

ALLOWED_LETTERS  : string = 'abcdefghijklmnopqrstuvwxyz0123456789'
ALLOWED_SEPS  : string = '-'

Properties

$basename  : string
$ext  : string

Methods

__construct()  : mixed
__toString()  : string
fromString()  : self
getFilename()  : string
isPartCorrect()  : bool
withBasename()  : self
withExt()  : self

Constants

ALLOWED_LETTERS

public string ALLOWED_LETTERS = 'abcdefghijklmnopqrstuvwxyz0123456789'

ALLOWED_SEPS

public string ALLOWED_SEPS = '-'

Properties

Methods

__construct()

public __construct(string $basename, string $ext) : mixed
Parameters
$basename : string
$ext : string

__toString()

public __toString() : string
Attributes
#[Override]
Return values
string

fromString()

public static fromString(string $filename[, bool $transform = false ]) : self
Parameters
$filename : string
$transform : bool = false
Return values
self

getFilename()

public getFilename() : string
Return values
string

isPartCorrect()

public isPartCorrect(string $part, bool $allowSep) : bool
Parameters
$part : string
$allowSep : bool
Return values
bool

withBasename()

public withBasename(string $basename) : self
Parameters
$basename : string
Return values
self

withExt()

public withExt(string $ext) : self
Parameters
$ext : string
Return values
self
On this page

Search results