BindingRegistrar.php
2 years ago
Registrar.php
2 years ago
ResponseFactory.php
1 month ago
UrlGenerator.php
1 month ago
UrlRoutable.php
2 years ago
ResponseFactory.php
144 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWPSCOPED\Illuminate\Contracts\Routing; |
| 4 | |
| 5 | /** @internal */ |
| 6 | interface ResponseFactory |
| 7 | { |
| 8 | /** |
| 9 | * Create a new response instance. |
| 10 | * |
| 11 | * @param array|string $content |
| 12 | * @param int $status |
| 13 | * @param array $headers |
| 14 | * @return \Illuminate\Http\Response |
| 15 | */ |
| 16 | public function make($content = '', $status = 200, array $headers = []); |
| 17 | /** |
| 18 | * Create a new "no content" response. |
| 19 | * |
| 20 | * @param int $status |
| 21 | * @param array $headers |
| 22 | * @return \Illuminate\Http\Response |
| 23 | */ |
| 24 | public function noContent($status = 204, array $headers = []); |
| 25 | /** |
| 26 | * Create a new response for a given view. |
| 27 | * |
| 28 | * @param string|array $view |
| 29 | * @param array $data |
| 30 | * @param int $status |
| 31 | * @param array $headers |
| 32 | * @return \Illuminate\Http\Response |
| 33 | */ |
| 34 | public function view($view, $data = [], $status = 200, array $headers = []); |
| 35 | /** |
| 36 | * Create a new JSON response instance. |
| 37 | * |
| 38 | * @param mixed $data |
| 39 | * @param int $status |
| 40 | * @param array $headers |
| 41 | * @param int $options |
| 42 | * @return \Illuminate\Http\JsonResponse |
| 43 | */ |
| 44 | public function json($data = [], $status = 200, array $headers = [], $options = 0); |
| 45 | /** |
| 46 | * Create a new JSONP response instance. |
| 47 | * |
| 48 | * @param string $callback |
| 49 | * @param mixed $data |
| 50 | * @param int $status |
| 51 | * @param array $headers |
| 52 | * @param int $options |
| 53 | * @return \Illuminate\Http\JsonResponse |
| 54 | */ |
| 55 | public function jsonp($callback, $data = [], $status = 200, array $headers = [], $options = 0); |
| 56 | /** |
| 57 | * Create a new streamed response instance. |
| 58 | * |
| 59 | * @param callable $callback |
| 60 | * @param int $status |
| 61 | * @param array $headers |
| 62 | * @return \Symfony\Component\HttpFoundation\StreamedResponse |
| 63 | */ |
| 64 | public function stream($callback, $status = 200, array $headers = []); |
| 65 | /** |
| 66 | * Create a new streamed response instance as a file download. |
| 67 | * |
| 68 | * @param callable $callback |
| 69 | * @param string|null $name |
| 70 | * @param array $headers |
| 71 | * @param string|null $disposition |
| 72 | * @return \Symfony\Component\HttpFoundation\StreamedResponse |
| 73 | */ |
| 74 | public function streamDownload($callback, $name = null, array $headers = [], $disposition = 'attachment'); |
| 75 | /** |
| 76 | * Create a new file download response. |
| 77 | * |
| 78 | * @param \SplFileInfo|string $file |
| 79 | * @param string|null $name |
| 80 | * @param array $headers |
| 81 | * @param string|null $disposition |
| 82 | * @return \Symfony\Component\HttpFoundation\BinaryFileResponse |
| 83 | */ |
| 84 | public function download($file, $name = null, array $headers = [], $disposition = 'attachment'); |
| 85 | /** |
| 86 | * Return the raw contents of a binary file. |
| 87 | * |
| 88 | * @param \SplFileInfo|string $file |
| 89 | * @param array $headers |
| 90 | * @return \Symfony\Component\HttpFoundation\BinaryFileResponse |
| 91 | */ |
| 92 | public function file($file, array $headers = []); |
| 93 | /** |
| 94 | * Create a new redirect response to the given path. |
| 95 | * |
| 96 | * @param string $path |
| 97 | * @param int $status |
| 98 | * @param array $headers |
| 99 | * @param bool|null $secure |
| 100 | * @return \Illuminate\Http\RedirectResponse |
| 101 | */ |
| 102 | public function redirectTo($path, $status = 302, $headers = [], $secure = null); |
| 103 | /** |
| 104 | * Create a new redirect response to a named route. |
| 105 | * |
| 106 | * @param string $route |
| 107 | * @param mixed $parameters |
| 108 | * @param int $status |
| 109 | * @param array $headers |
| 110 | * @return \Illuminate\Http\RedirectResponse |
| 111 | */ |
| 112 | public function redirectToRoute($route, $parameters = [], $status = 302, $headers = []); |
| 113 | /** |
| 114 | * Create a new redirect response to a controller action. |
| 115 | * |
| 116 | * @param string $action |
| 117 | * @param mixed $parameters |
| 118 | * @param int $status |
| 119 | * @param array $headers |
| 120 | * @return \Illuminate\Http\RedirectResponse |
| 121 | */ |
| 122 | public function redirectToAction($action, $parameters = [], $status = 302, $headers = []); |
| 123 | /** |
| 124 | * Create a new redirect response, while putting the current URL in the session. |
| 125 | * |
| 126 | * @param string $path |
| 127 | * @param int $status |
| 128 | * @param array $headers |
| 129 | * @param bool|null $secure |
| 130 | * @return \Illuminate\Http\RedirectResponse |
| 131 | */ |
| 132 | public function redirectGuest($path, $status = 302, $headers = [], $secure = null); |
| 133 | /** |
| 134 | * Create a new redirect response to the previously intended location. |
| 135 | * |
| 136 | * @param string $default |
| 137 | * @param int $status |
| 138 | * @param array $headers |
| 139 | * @param bool|null $secure |
| 140 | * @return \Illuminate\Http\RedirectResponse |
| 141 | */ |
| 142 | public function redirectToIntended($default = '/', $status = 302, $headers = [], $secure = null); |
| 143 | } |
| 144 |