/**
* @param string $name
* @param mixed $parameters
* @param null|array $getParams
*/
url(?string $name = null, $parameters = null, ?array $getParams)
response()
request()
/**
* @param string|null $index: Parameter index name
* @param string|null $defaultValue: Default return value
* @param array ...$methods: Default methods
*
* @return mixed
*/
input(string $index = null, string $defaultValue = null, ...$methods)
/**
* @param string $url: the route to which you will be redirected
* @param int|null $code: HTTP code
*/
redirect(string $url, ?int $code = null)
/**
* @param string $key: key to identify the requisition
* @param int $limit: number of times the request can be made
* @param int $seconds: waiting time until it is possible to make the request again.
*
* @return bool
*/
request_limit(string $key, int $limit = 5, int $seconds = 60)
/**
* @param string $key: key to identify the requisition
* @param string $value: value that will be added
*
* @return bool
*/
request_repeat(string $key, string $value)
csrf_token()
/**
* @param string $method: GET, POST, PUT or DELETE
*/
spoofing(string $method)
password_hash
./**
* @param mixed $value: the user's password.
* @param int $cost: which denotes the algorithmic cost that should be used.
*/
pass_hash($value, int $cost = 10)
password_verify
./**
* @param mixed $value: the user's password.
* @param string $hash: a hash created by `pass_hash()`.
*/
pass_verify($value, string $hash)
See Wolf Template to use Wolf helpers.
Load a CSS file into the public/assets/_css/
folder.
/**
* @param string $asset: CSS file name
*/
loadCss(string $asset)
minify()->style()
method.loadMinCss()
public/assets/_js/
folder./**
* @param string $asset: javascript file name
*/
loadJs(string $asset)
minify()->script()
method.loadMinJs()
public/assets/_img/
folder./**
* @param string $asset: image file name
*/
loadImg(string $asset)
public/assets/
folder./**
* @param string $asset: external file name
*/
loadFile(string $asset)
var_dump
./**
* @param mixed $value: to format
*/
pre($value)
cloner
uses Symfony VarCloner
function. See more./**
* @param mixed $var
*/
cloner($var)
true
to return as an array./**
* @param mixed $var
* @param bool $length
*/
dumper($var, bool $length = false)
dump
function.dump($var)
export
uses the Symfony VarExport
function. See more./**
* @param mixed $value
*/
export($value)
/**
* @param mixed $value: to JSON
*/
encodeJSON($value)
true
to convert JSON to an array./**
* @param mixed $value: to JSON
* @param bool $toArray: convert JSON object in array
*/
decodeJSON($value, bool $toArray = false)
/**
* @param mixed ...$messages
*
* @return void
*/
console_log(...$messages)
remove_param()
/**
* @param mixed $string: verify if value is JSON
*/
is_json($string)
/**
* @param string $uri
*/
get_url(string $uri = null)