logo

Documentation: Function Helpers

Helpers are procedural functions using global namespace, located in helpers folder, loaded manually by event listeners or view resolvers. Some are useful for subsequent models while others are useful for views, their entire purpose being to simplify calls and hide complexity underneath.

Helpers for Classes

A side-effect of event listeners is their ability to require functions that may become helpful in other models. Framework Skeleton API bundles following:

Function Arguments Returns Description Loader
SQL string $query,
array $parameters=array()
Executes SQL prepared statement execution and returns results (Tutorials)
getRemoteResource string $url,
array $fields=[]
array Gets remote resource from current OAuth2 driver (Tutorials)

Helpers for Views

A side-effect of both event listeners and view resolvers is their ability to require functions that may become helpful in views. Framework Skeleton API bundles following:

Function Arguments Returns Description Loader
translate string $key,
string $domain="",
...$parameters
string Translates text into preferred or default locale (Tutorials)
×