PHP Класс Flint\Controller\Controller

Наследование: extends Flint\PimpleAware
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
createNotFoundException ( string $message = 'Not Found' ) : Exception This will result in a 404 response code.
getRequest ( ) : Request

Описание методов

abort() публичный Метод

См. также: Silex\Application::abort()
public abort ( $statusCode, $message = '', array $headers = [] )
$headers array

createForm() публичный Метод

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
Результат Symfony\Component\Form\Form

createFormBuilder() публичный Метод

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
Результат Symfony\Component\Form\FormBuilder

createNotFoundException() защищенный Метод

This will result in a 404 response code.
protected createNotFoundException ( string $message = 'Not Found' ) : Exception
$message string
Результат Exception

generateUrl() публичный Метод

См. также: Symfony\Component\Routing\RouterInterface::generate()
public generateUrl ( $name, array $parameters = [], $reference = UrlGeneratorInterface::ABSOLUTE_PATH )
$parameters array

get() публичный Метод

public get ( string $id ) : mixed
$id string
Результат mixed

getRequest() защищенный Метод

protected getRequest ( ) : Request
Результат Symfony\Component\HttpFoundation\Request

getUser() публичный Метод

Get a user from the Security Context
public getUser ( ) : mixed
Результат mixed

has() публичный Метод

public has ( string $id ) : boolean
$id string
Результат boolean

redirect() публичный Метод

См. также: Silex\Application::redirect()
public redirect ( $url, $statusCode = 302 )

render() публичный Метод

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

text() публичный Метод

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
Результат Symfony\Component\HttpFoundation\Response