Метод |
Описание |
|
__construct ( string $name = 'default', mixed $cache = False, boolean $log = False ) |
Create a Ham application. |
|
__invoke ( mixed | boolean $app = False ) : mixed | string |
Invoke method allows the application to be mounted as a closure. |
|
_abort ( integer $code, string $message = '', Ham $app = null ) : string |
static version of abort
to allow for calling of abort by class |
|
abort ( integer $code, string $message = '' ) : string |
application specific Cancel method |
|
config_from_env ( $var ) |
Allows configuration file to be specified by environment variable,
to make deployment easy. |
|
config_from_file ( $filename ) |
Configure an application object from a file. |
|
create_cache ( $prefix, $dummy = False, $redisFirst = False ) |
Cache factory, be it XCache or APC. |
|
create_logger ( $log_file ) |
Logger factory; just FileLogger for now. |
|
json ( $obj, $code = 200 ) |
|
|
onError ( $closure_callback, $logMessage = NULL ) |
Exists only as a function to fill as a setter for
A developer to add custom 404 pages
If a log message is set, it will append the error functio
to the developer-defined one. |
|
partial ( $view, $data = null ) |
|
|
render ( $view, $data = null, $layout = null ) |
Returns the contents of a template, populated with the data given to it. |
|
route ( $uri, $callback, array $request_methods = ['GET'] ) : boolean |
Add routes |
|
run ( ) |
Calls route and outputs it to STDOUT |
|