PHP Class Flint\Controller\Controller

Inheritance: extends Flint\PimpleAware
Afficher le fichier Open project: flint/flint Class Usage Examples

Méthodes publiques

Méthode Description
abort ( $statusCode, $message = '', array $headers = [] )
createForm ( string | FormTypeInterface $type, mixed $data = null, array $options = [] ) : Form Creates and returns a Form instance from the type of the form.
createFormBuilder ( mixed $data = null, array $options = [] ) : FormBuilder Creates and returns a form builder instance
generateUrl ( $name, array $parameters = [], $reference = UrlGeneratorInterface::ABSOLUTE_PATH )
get ( string $id ) : mixed
getUser ( ) : mixed Get a user from the Security Context
has ( string $id ) : boolean
redirect ( $url, $statusCode = 302 )
render ( $name, array $context = [] )
text ( string $text, integer $statusCode = 200, array $headers = [] ) : Response Creates a normal response with the given text and statusCode

Méthodes protégées

Méthode Description
createNotFoundException ( string $message = 'Not Found' ) : Exception This will result in a 404 response code.
getRequest ( ) : Request

Method Details

abort() public méthode

See also: Silex\Application::abort()
public abort ( $statusCode, $message = '', array $headers = [] )
$headers array

createForm() public méthode

Creates and returns a Form instance from the type of the form.
public createForm ( string | FormTypeInterface $type, mixed $data = null, array $options = [] ) : Form
$type string | FormTypeInterface The built type of the form
$data mixed The initial data for the form
$options array Options for the form
Résultat Symfony\Component\Form\Form

createFormBuilder() public méthode

Creates and returns a form builder instance
public createFormBuilder ( mixed $data = null, array $options = [] ) : FormBuilder
$data mixed The initial data for the form
$options array Options for the form
Résultat Symfony\Component\Form\FormBuilder

createNotFoundException() protected méthode

This will result in a 404 response code.
protected createNotFoundException ( string $message = 'Not Found' ) : Exception
$message string
Résultat Exception

generateUrl() public méthode

See also: Symfony\Component\Routing\RouterInterface::generate()
public generateUrl ( $name, array $parameters = [], $reference = UrlGeneratorInterface::ABSOLUTE_PATH )
$parameters array

get() public méthode

public get ( string $id ) : mixed
$id string
Résultat mixed

getRequest() protected méthode

protected getRequest ( ) : Request
Résultat Symfony\Component\HttpFoundation\Request

getUser() public méthode

Get a user from the Security Context
public getUser ( ) : mixed
Résultat mixed

has() public méthode

public has ( string $id ) : boolean
$id string
Résultat boolean

redirect() public méthode

See also: Silex\Application::redirect()
public redirect ( $url, $statusCode = 302 )

render() public méthode

public render ( $name, array $context = [] )
$context array

text() public méthode

Creates a normal response with the given text and statusCode
public text ( string $text, integer $statusCode = 200, array $headers = [] ) : Response
$text string
$statusCode integer
$headers array
Résultat Symfony\Component\HttpFoundation\Response