Blame view

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