Loader
in package
implements
LoaderInterface
File or Class Loader
PHP Mini Framework
Tags
Interfaces, Classes, Traits and Enums
- LoaderInterface
- PHP Mini Framework
Table of Contents
- $appPath : string
- $configPath : string
- $viewPath : string
- config() : mixed
- Load Config File
- load() : string
- Fetches print result instead of sending it to the output buffer
- require() : mixed
- Require file
- view() : string
- Load View File
- withConfig() : self
- __construct() : mixed
Properties
$appPath
protected
string
$appPath
= null
Tags
$configPath
protected
string
$configPath
= null
Tags
$viewPath
protected
string
$viewPath
= null
Tags
Methods
config()
Load Config File
public
config(string $path) : mixed
Parameters
- $path : string
Tags
Return values
mixed —load()
Fetches print result instead of sending it to the output buffer
public
static load(string $path[, array<string|int, mixed> $data = null ]) : string
Parameters
- $path : string
- $data : array<string|int, mixed> = null
Tags
Return values
string —The rendered content
require()
Require file
public
static require(string $path[, array<string|int, mixed> $data = null ]) : mixed
Parameters
- $path : string
- $data : array<string|int, mixed> = null
Tags
Return values
mixed —view()
Load View File
public
view(string $path[, array<string|int, mixed> $vars = array() ][, bool $return = false ]) : string
Parameters
- $path : string
- $vars : array<string|int, mixed> = array()
- $return : bool = false
Tags
Return values
string —withConfig()
public
static withConfig(Config $config) : self
Parameters
- $config : Config
Tags
Return values
self —__construct()
protected
__construct() : mixed