Menu

## API Documentation

### Namespaces

Snaju

### Table of Contents

render() : string
  Renders a view, relative to the pages/views directory. The pages directory is determined by the
response() : ResponseHandler
  Returns the Response class which can then be used to return a specific response type.
config() : mixed|null
  Retrieves a value from a config file given its name/key. Null returned if key not found.
env() : string|null
  Retrieves a value from the .env file given its name/key. Null returned if key not found.
flash() : FlashMessage
controller() : Controller
redirect() : mixed
  Performs either or permanent (301) or temporary (302) redirect to a specified url.

### Functions

#### render()

GlobalHelpers.php : 20

Renders a view, relative to the pages/views directory. The pages directory is determined by the

`render(mixed ...$args) : string`

##### Parameters

$args : mixed

##### Tags

global

  ResponseHandler

see

  ResponseHandler::getInstance()->render()

##### Return values

string —

#### response()

GlobalHelpers.php : 33

Returns the Response class which can then be used to return a specific response type.

`response() : ResponseHandler`

##### Tags

see
  ResponseHandler

##### Return values

ResponseHandler —

#### config()

GlobalHelpers.php : 48

Retrieves a value from a config file given its name/key. Null returned if key not found.

`config( $key) : mixed|null`

##### Parameters

$key :

##### Tags

see
  Config
todo

  Add secondary argument to set and return the key if it doesn't exist

##### Return values

mixed|null —

#### env()

GlobalHelpers.php : 62

Retrieves a value from the .env file given its name/key. Null returned if key not found.

`env( $key) : string|null`

##### Parameters

$key :

##### Tags

todo

  Add secondary argument to set and return the key if it doesn't exist

##### Return values

string|null —

#### flash()

GlobalHelpers.php : 76
`flash() : FlashMessage`

##### Tags

see
  FlashMessage::instance()

##### Return values

FlashMessage —

#### controller()

GlobalHelpers.php : 88
`controller([array<string|int, mixed> $middleware = [] ]) : Controller`

##### Parameters

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

##### Tags

see
  Controller::getInstance()

##### Return values

Controller —

#### redirect()

GlobalHelpers.php : 100

Performs either or permanent (301) or temporary (302) redirect to a specified url.

`redirect( $url[, false $permanent = false ]) : mixed`

##### Parameters

$url :
$permanent : false = false

##### Return values

mixed —

## Search results