Documentation

App
in package
implements ArrayAccess

Interfaces, Classes, Traits and Enums

ArrayAccess

Table of Contents

$helpers  : ArrayObject
$layout  : mixed
$request  : Request|null
$response  : Response|null
$apps  : mixed
$blocks  : array<string|int, mixed>
$events  : array<string|int, mixed>
$paths  : array<string|int, mixed>
$registry  : array<string|int, mixed>
$routes  : array<string|int, mixed>
__clone()  : void
Object behavior on clone
__construct()  : mixed
Constructor
__get()  : mixed
__invoke()  : mixed
assets()  : string
Get assets inc. markup
base()  : void
baseUrl()  : string
Returns link based on the base url of the app
bind()  : void
Bind request to route
bindClass()  : void
Bind Class to routes
bindNamespace()  : void
Bind namespace to routes
block()  : string
Get block content
cache()  : mixed
Cache helper method
decode()  : string
Decode RC4 encrypted text
dispatch()  : mixed
Dispatch route
encode()  : string
RC4 encryption
end()  : null
End block
escape()  : string
Escape string.
get()  : void
Bind GET request to route
getClientIp()  : string
Get client ip.
getClientLang()  : string
Get client language
getSiteUrl()  : string
Get site url
hash()  : string
Create Hash
helper()  : Helper
instance()  : object
Get App instance
invoke()  : mixed
Invoke Class as controller
isAbsolutePath()  : bool
loadModule()  : mixed
loadModules()  : array<string|int, mixed>
module()  : mixed
offsetExists()  : bool
offsetGet()  : mixed
offsetSet()  : void
offsetUnset()  : void
on()  : App
Bind an event to closure
param()  : mixed
Get request variables
path()  : mixed
Path helper method
paths()  : array<string|int, mixed>
pathToUrl()  : bool|string
post()  : void
Bind POST request to route
registerModule()  : Module
render()  : string
Render view.
req_is()  : bool
Request helper function
reroute()  : void
Redirect to path.
retrieve()  : mixed
Get a value from the Lime registry
route()  : void
routeUrl()  : string
Returns link based on the route url of the app
run()  : void
Run Application request
script()  : string
Get script inc. markup
service()  : object
Returns a closure that stores the result of the given closure
set()  : self
Put a value in the Lime registry
start()  : null
Start block
stop()  : void
stop application (exit)
style()  : string
Get style inc. markup
trigger()  : bool
Trigger event.
bootModule()  : void
getRequestfromGlobals()  : Request
render_route()  : string
Render dispatched route

Properties

$helpers

public ArrayObject $helpers

$layout

public mixed $layout = false

$apps

protected static mixed $apps = []

$blocks

protected array<string|int, mixed> $blocks = []

$events

protected array<string|int, mixed> $events = []

$paths

protected array<string|int, mixed> $paths = []

$registry

protected array<string|int, mixed> $registry = []

$routes

protected array<string|int, mixed> $routes = []

Methods

__clone()

Object behavior on clone

public __clone() : void
Return values
void

__construct()

Constructor

public __construct([array<string|int, mixed> $settings = [] ]) : mixed
Parameters
$settings : array<string|int, mixed> = []

initial registry settings

Return values
mixed

__get()

public __get(mixed $name) : mixed
Parameters
$name : mixed
Return values
mixed

__invoke()

public __invoke(mixed $helper) : mixed
Parameters
$helper : mixed
Return values
mixed

assets()

Get assets inc. markup

public assets(array<string|int, mixed>|string $src[, mixed $version = null ]) : string
Parameters
$src : array<string|int, mixed>|string
$version : mixed = null
Return values
string

base()

public base(string $path) : void
Parameters
$path : string
Return values
void

baseUrl()

Returns link based on the base url of the app

public baseUrl(string $path) : string
Parameters
$path : string

e.g. /js/myscript.js

Return values
string

Link

bind()

Bind request to route

public bind(string $path, Closure $callback[, bool $condition = true ]) : void
Parameters
$path : string
$callback : Closure
$condition : bool = true
Return values
void

bindClass()

Bind Class to routes

public bindClass(string $class[, string|null $alias = null ]) : void
Parameters
$class : string
$alias : string|null = null
Return values
void

bindNamespace()

Bind namespace to routes

public bindNamespace(string $namespace[, string|null $alias = null ]) : void
Parameters
$namespace : string
$alias : string|null = null
Return values
void

block()

Get block content

public block(string $name[, array<string|int, mixed> $options = [] ]) : string
Parameters
$name : string
$options : array<string|int, mixed> = []
Return values
string

cache()

Cache helper method

public cache() : mixed
Return values
mixed

decode()

Decode RC4 encrypted text

public decode(string $data, string $pwd) : string
Parameters
$data : string
$pwd : string
Return values
string

dispatch()

Dispatch route

public dispatch(string $path) : mixed
Parameters
$path : string
Return values
mixed

encode()

RC4 encryption

public encode(string $data, string $pwd[, bool $base64encoded = false ]) : string
Parameters
$data : string
$pwd : string
$base64encoded : bool = false
Return values
string

end()

End block

public end(string $name) : null
Parameters
$name : string
Return values
null

escape()

Escape string.

public escape(string $string[, string $charset = null ]) : string
Parameters
$string : string
$charset : string = null
Return values
string

get()

Bind GET request to route

public get(string $path, Closure $callback[, bool $condition = true ]) : void
Parameters
$path : string
$callback : Closure
$condition : bool = true
Return values
void

getClientIp()

Get client ip.

public getClientIp() : string
Return values
string

getClientLang()

Get client language

public getClientLang([string $default = "en" ]) : string
Parameters
$default : string = "en"
Return values
string

getSiteUrl()

Get site url

public getSiteUrl([bool $withpath = false ]) : string
Parameters
$withpath : bool = false
Return values
string

hash()

Create Hash

public hash(string $text[, mixed $algo = PASSWORD_BCRYPT ]) : string
Parameters
$text : string
$algo : mixed = PASSWORD_BCRYPT
Return values
string

helper()

public helper(string $helper) : Helper
Parameters
$helper : string
Return values
Helper

instance()

Get App instance

public static instance(string $name[, bool $clone = false ]) : object
Parameters
$name : string

Lime app name

$clone : bool = false
Return values
object

Lime app object

invoke()

Invoke Class as controller

public invoke(string $class[, string $action = 'index' ][, array<string|int, mixed> $params = [] ]) : mixed
Parameters
$class : string
$action : string = 'index'
$params : array<string|int, mixed> = []
Return values
mixed

isAbsolutePath()

public isAbsolutePath(string $path) : bool
Parameters
$path : string
Return values
bool

loadModule()

public loadModule(mixed $path[, mixed $prefix = null ]) : mixed
Parameters
$path : mixed
$prefix : mixed = null
Return values
mixed

loadModules()

public loadModules(mixed $dirs[, bool $autoload = true ][, mixed $prefix = null ]) : array<string|int, mixed>
Parameters
$dirs : mixed
$autoload : bool = true
$prefix : mixed = null
Return values
array<string|int, mixed>

module()

public module(string $name) : mixed
Parameters
$name : string
Return values
mixed

offsetExists()

public offsetExists(mixed $key) : bool
Parameters
$key : mixed
Return values
bool

offsetGet()

public offsetGet(mixed $key) : mixed
Parameters
$key : mixed
Return values
mixed

offsetSet()

public offsetSet(mixed $key, mixed $value) : void
Parameters
$key : mixed
$value : mixed
Return values
void

offsetUnset()

public offsetUnset(mixed $key) : void
Parameters
$key : mixed
Return values
void

on()

Bind an event to closure

public on(string $event, Closure $callback, int $priority) : App
Parameters
$event : string
$callback : Closure
$priority : int
Return values
App

param()

Get request variables

public param([string $index = null ][, mixed $default = null ][, array<string|int, mixed> $source = null ]) : mixed
Parameters
$index : string = null
$default : mixed = null
$source : array<string|int, mixed> = null
Return values
mixed

path()

Path helper method

public path() : mixed
Return values
mixed

paths()

public paths([ $namespace = null ]) : array<string|int, mixed>
Parameters
$namespace : = null
Return values
array<string|int, mixed>

pathToUrl()

public pathToUrl( $path[, bool $full = false ]) : bool|string
Parameters
$path :
$full : bool = false
Return values
bool|string

post()

Bind POST request to route

public post(string $path, Closure $callback[, bool $condition = true ]) : void
Parameters
$path : string
$callback : Closure
$condition : bool = true
Return values
void

registerModule()

public registerModule(string $name, string $dir) : Module
Parameters
$name : string
$dir : string
Return values
Module

render()

Render view.

public render(string $____template[, array<string|int, mixed> $_____slots = [] ]) : string
Parameters
$____template : string

Path to view

$_____slots : array<string|int, mixed> = []

Passed variables

Return values
string

Rendered view

req_is()

Request helper function

public req_is(string $type) : bool
Parameters
$type : string
Return values
bool

reroute()

Redirect to path.

public reroute(string $path) : void
Parameters
$path : string

Path redirect to.

Return values
void

retrieve()

Get a value from the Lime registry

public retrieve(string $key[, mixed $default = null ]) : mixed
Parameters
$key : string
$default : mixed = null
Return values
mixed

route()

public route() : void
Return values
void

routeUrl()

Returns link based on the route url of the app

public routeUrl(string $path) : string
Parameters
$path : string

e.g. /pages/home

Return values
string

Link

run()

Run Application request

public run([string $route = null ][, Request|null $request = null ][, bool $flush = true ]) : void
Parameters
$route : string = null

Route to parse

$request : Request|null = null
$flush : bool = true
Return values
void

script()

Get script inc. markup

public script(mixed $src[, string|null $version = null ]) : string
Parameters
$src : mixed
$version : string|null = null
Return values
string

service()

Returns a closure that stores the result of the given closure

public service(string $name, Closure $callable) : object
Parameters
$name : string
$callable : Closure
Return values
object

set()

Put a value in the Lime registry

public set(string $key, mixed $value) : self
Parameters
$key : string

Key name

$value : mixed

Value

Return values
self

start()

Start block

public start(string $name) : null
Parameters
$name : string
Return values
null

stop()

stop application (exit)

public stop([mixed $data = null ][, int|null $status = null ]) : void
Parameters
$data : mixed = null
$status : int|null = null
Return values
void

style()

Get style inc. markup

public style(mixed $href[, string|null $version = null ]) : string
Parameters
$href : mixed
$version : string|null = null
Return values
string

trigger()

Trigger event.

public trigger(string $event[, array<string|int, mixed> $params = [] ]) : bool
Parameters
$event : string
$params : array<string|int, mixed> = []
Return values
bool

bootModule()

protected bootModule(Module $module) : void
Parameters
$module : Module
Return values
void

getRequestfromGlobals()

protected getRequestfromGlobals() : Request
Return values
Request

render_route()

Render dispatched route

protected render_route(string $route[, array<string|int, mixed> $params = [] ]) : string
Parameters
$route : string
$params : array<string|int, mixed> = []
Return values
string

Search results