class FileLoader

Loads configuration files and converts them to php arrays using Decoders

Methods

addDecoder(DecoderInterface $decoder)

Add a file decoder to the FileLoader

addFiles(mixed $files)

Add a file bag, or change an array of SplFileInfo Objects to proper objects.

array
process(bool $ns = true)

Process the current FileBag and return an array

array
decodeFileBagData(FileBag $fileBag, bool $ns = true)

Process file bag to load into the data manager.

string
getFileContents(SplFileInfo $file)

Returns the contents of the file.

array
getDecoders()

Returns currently attached custom decoders

array
getMimeTypes()

Returns currently supported Mime Types

mixed
sanitizeNamespace($ns)

Cleans up a file name for use as a namespace

Details

at line line 58
addDecoder(DecoderInterface $decoder)

Add a file decoder to the FileLoader

Parameters

DecoderInterface $decoder

at line line 75
addFiles(mixed $files)

Add a file bag, or change an array of SplFileInfo Objects to proper objects.

Parameters

mixed $files a FileBag or an array of SplFileInfo objects.

at line line 95
array process(bool $ns = true)

Process the current FileBag and return an array

Parameters

bool $ns

Return Value

array

at line line 109
array decodeFileBagData(FileBag $fileBag, bool $ns = true)

Process file bag to load into the data manager.

A file bag is an array of SplFileInfo objects.

Parameters

FileBag $fileBag
bool $ns

Return Value

array

Exceptions

Exception

at line line 159
string getFileContents(SplFileInfo $file)

Returns the contents of the file.

Parameters

SplFileInfo $file

Return Value

string the contents of the file

at line line 218
array getDecoders()

Returns currently attached custom decoders

Return Value

array

at line line 227
array getMimeTypes()

Returns currently supported Mime Types

Return Value

array

at line line 237
mixed sanitizeNamespace($ns)

Cleans up a file name for use as a namespace

Parameters

$ns

Return Value

mixed