class ParsedFileID (View source)

Immutable representation of a parsed fileID broken down into its sub-components.

Methods

public
__construct(string $filename, string $hash = '', string $variant = '', string $fileID = '')

ParsedFileID constructor.

public
string
getFileID()

The File ID associated with this ParsedFileID if known, or blank if unknown.

public
string
getFilename()

Filename component.

public
string
getVariant()

Variant component. Usually a string representing some resized version of an image.

public
string
getHash()

Hash build from the content of the file. Usually the first 10 characters of sha1 hash.

public
array
getTuple()

Convert this parsed file ID to an array representation.

public
setFileID(string $fileID)

No description

public
setFilename(string $filename)

No description

public
setVariant(string $variant)

No description

public
setHash(string $hash)

No description

Details

__construct(string $filename, string $hash = '', string $variant = '', string $fileID = '')

ParsedFileID constructor.

Parameters

string $filename
string $hash
string $variant
string $fileID

Original FileID use to generate this ParsedFileID

string getFileID()

The File ID associated with this ParsedFileID if known, or blank if unknown.

Return Value

string

string getFilename()

Filename component.

Return Value

string

string getVariant()

Variant component. Usually a string representing some resized version of an image.

Return Value

string

string getHash()

Hash build from the content of the file. Usually the first 10 characters of sha1 hash.

Return Value

string

array getTuple()

Convert this parsed file ID to an array representation.

Return Value

array

ParsedFileID setFileID(string $fileID)

No description

Parameters

string $fileID

Return Value

ParsedFileID

ParsedFileID setFilename(string $filename)

No description

Parameters

string $filename

Return Value

ParsedFileID

ParsedFileID setVariant(string $variant)

No description

Parameters

string $variant

Return Value

ParsedFileID

ParsedFileID setHash(string $hash)

No description

Parameters

string $hash

Return Value

ParsedFileID