PHP Class Dietcube\Controller

Afficher le fichier Open project: mercari/dietcube Class Usage Examples

Protected Properties

Свойство Type Description
$container
$view_vars

Méthodes publiques

Méthode Description
__construct ( Pimple\Container $container )
setVars ( $key, $value = null )

Méthodes protégées

Méthode Description
body ( $name = null, $default = null )
findTemplate ( $name )
generateUrl ( $handler, array $data = [], array $query_params = [], $is_absolute = false )
get ( $name )
getResponse ( )
isPost ( )
json ( array $vars, string | null $charset = 'utf-8' ) : string Helper method to respond JSON.
query ( $name, $default = null )
redirect ( $uri, $code = 302 )
render ( $name, array $vars = [] )

Method Details

__construct() public méthode

public __construct ( Pimple\Container $container )
$container Pimple\Container

body() protected méthode

protected body ( $name = null, $default = null )

findTemplate() protected méthode

protected findTemplate ( $name )

generateUrl() protected méthode

protected generateUrl ( $handler, array $data = [], array $query_params = [], $is_absolute = false )
$data array
$query_params array

get() protected méthode

protected get ( $name )

getResponse() protected méthode

protected getResponse ( )

isPost() protected méthode

protected isPost ( )

json() protected méthode

Helper method to respond JSON.
protected json ( array $vars, string | null $charset = 'utf-8' ) : string
$vars array
$charset string | null
Résultat string JSON encoded string

query() protected méthode

protected query ( $name, $default = null )

redirect() protected méthode

protected redirect ( $uri, $code = 302 )

render() protected méthode

protected render ( $name, array $vars = [] )
$vars array

setVars() public méthode

public setVars ( $key, $value = null )

Property Details

$container protected_oe property

protected $container

$view_vars protected_oe property

protected $view_vars