\

Namespaces

Quark

Constants

BASE_PATH

BASE_PATH

Functions

app()

app() : \Quark\Application

Get application instance.

Returns

\Quark\Application

Application instance.

array_merge_deep()

array_merge_deep(array  $array1 = array(), array  $array2 = array()) : array

Array merge deep.

Parameters

array $array1

First array.

array $array2

Second array.

Returns

array —

Merged array.

base_path()

base_path(string  $path = '') : string

Get base path.

Parameters

string $path

Prepend base path.

Returns

string —

Base path.

config()

config(string  $key, mixed  $default = null) : mixed

Get configuration value.

Parameters

string $key

Configuration key.

mixed $default

Default value.

Returns

mixed —

Configuration value.

debug()

debug() 

Debug an expression.

env()

env() : string

Get environment.

Returns

string —

Environment.

get_all_headers()

get_all_headers() : array

Get all headers.

Returns

array —

Headers.

join_path()

join_path() : string

Join paths.

Returns

string —

Joined paths.

locale()

locale() : string

Get locale.

Returns

string —

Locale.

manifest()

manifest(string  $key, mixed  $default = null) : mixed

Get a manifest value.

Parameters

string $key

Manifest key.

mixed $default

Default value.

Returns

mixed —

Manifest value.

path()

path(string  $key, mixed  $default = null) : string

Get configuration path.

Parameters

string $key

Path key.

mixed $default

Default value.

Returns

string —

Configuration path.

redirect()

redirect(string  $url, boolean  $permanent = true) 

Redirect to an URL.

Parameters

string $url

URL.

boolean $permanent

Permanent redirection.

starts_with()

starts_with(string  $haystack, string  $needle) : boolean

Starts with.

Parameters

string $haystack

Haystack.

string $needle

Needle.

Returns

boolean —

True if it starts with, false otherwise.

twig()

twig() : \Quark\Twig

Get Twig instance.

Returns

\Quark\Twig —

Twig instance.