\LiftKit\Loader\FileLoader

Abstract File Loader

This class provides an abstraction for loading files, such as views or configuration files.

Summary

Methods
Properties
Constants
__construct()
load()
No public properties found
No constants found
transformPath()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(string  $basePath = '', string  $suffix = '') 

Initializes object

Parameters

string $basePath
string $suffix

load()

load(string  $filePath, array  $data = array()) : mixed

Loads file and returns result.

Parameters

string $filePath

The path to the file to load. Will be transformed by transformPath()

array $data

Optional data to send to file

Returns

mixed

transformPath()

transformPath(string  $path) : string

Prepends $basePath and appends $suffix to a path.

Parameters

string $path

Returns

string