FileCollectionRegistry implements SingletonInterface
Registry for FileCollection classes
Table of Contents
Interfaces
- SingletonInterface
- "empty" interface for singletons (marker interface pattern)
Properties
- $types : array<string|int, mixed>
- Registered FileCollection types
Methods
- __construct() : mixed
- Constructor
- fileCollectionTypeExists() : bool
- Checks if the given FileCollection type exists
- getFileCollectionClass() : string
- Returns a class name for a given type
- registerFileCollectionClass() : bool
- Register a (new) FileCollection type
Properties
$types
Registered FileCollection types
protected
array<string|int, mixed>
$types
= []
Methods
__construct()
Constructor
public
__construct() : mixed
fileCollectionTypeExists()
Checks if the given FileCollection type exists
public
fileCollectionTypeExists(string $type) : bool
Parameters
- $type : string
-
Type of the FileCollection
Return values
bool —TRUE if the FileCollection exists, FALSE otherwise
getFileCollectionClass()
Returns a class name for a given type
public
getFileCollectionClass(string $type) : string
Parameters
- $type : string
Tags
Return values
string —The class name
registerFileCollectionClass()
Register a (new) FileCollection type
public
registerFileCollectionClass(string $className, string $type[, bool $override = false ]) : bool
Parameters
- $className : string
- $type : string
-
FileCollection type max length 30 chars (db field restriction)
- $override : bool = false
-
existing FileCollection type
Tags
Return values
bool —TRUE if registration succeeded