ResponseFactory
Implements
Uses
Properties
Methods
__construct ( Factory $view , Redirector $redirector ) : void
Create a new response factory instance.
Parameters
- $view Factory
- $redirector Redirector
make ( $content , $status , array $headers ) : Response
Create a new response instance.
Parameters
- $content mixed
- $status int
- $headers array
noContent ( $status , array $headers ) : Response
Create a new "no content" response.
Parameters
- $status int
- $headers array
view ( $view , $data , $status , array $headers ) : Response
Create a new response for a given view.
Parameters
- $view string|array
- $data array
- $status int
- $headers array
json ( $data , $status , array $headers , $options ) : JsonResponse
Create a new JSON response instance.
Parameters
- $data mixed
- $status int
- $headers array
- $options int
jsonp ( $callback , $data , $status , array $headers , $options ) : JsonResponse
Create a new JSONP response instance.
Parameters
- $callback string
- $data mixed
- $status int
- $headers array
- $options int
stream ( $callback , $status , array $headers ) : Symfony\...\StreamedResponse
Create a new streamed response instance.
Parameters
- $callback callable
- $status int
- $headers array
streamDownload ( $callback , $name , array $headers , $disposition ) : Symfony\...\StreamedResponse
Create a new streamed response instance as a file download.
Parameters
- $callback callable
- $name string|null
- $headers array
- $disposition string|null
download ( $file , $name , array $headers , $disposition ) : Symfony\...\BinaryFileResponse
Create a new file download response.
Parameters
- $file SplFileInfo |string
- $name string|null
- $headers array
- $disposition string|null
fallbackName ( $name ) : string
Convert the string to ASCII characters that are equivalent to the given name.
Parameters
- $name string
file ( $file , array $headers ) : Symfony\...\BinaryFileResponse
Return the raw contents of a binary file.
Parameters
- $file SplFileInfo |string
- $headers array
redirectTo ( $path , $status , $headers , $secure ) : RedirectResponse
Create a new redirect response to the given path.
Parameters
- $path string
- $status int
- $headers array
- $secure bool|null
redirectToRoute ( $route , $parameters , $status , $headers ) : RedirectResponse
Create a new redirect response to a named route.
Parameters
- $route string
- $parameters mixed
- $status int
- $headers array
redirectToAction ( $action , $parameters , $status , $headers ) : RedirectResponse
Create a new redirect response to a controller action.
Parameters
- $action string
- $parameters mixed
- $status int
- $headers array
redirectGuest ( $path , $status , $headers , $secure ) : RedirectResponse
Create a new redirect response, while putting the current URL in the session.
Parameters
- $path string
- $status int
- $headers array
- $secure bool|null
redirectToIntended ( $default , $status , $headers , $secure ) : RedirectResponse
Create a new redirect response to the previously intended location.
Parameters
- $default string
- $status int
- $headers array
- $secure bool|null