1 | <?php |
||
10 | class FilterIfInstantClick |
||
11 | { |
||
12 | /** |
||
13 | * The DomCrawler instance. |
||
14 | * |
||
15 | * @var \Symfony\Component\DomCrawler\Crawler |
||
16 | */ |
||
17 | protected $crawler; |
||
18 | |||
19 | /** |
||
20 | * Handle an incoming request. |
||
21 | * |
||
22 | * @param \Illuminate\Http\Request $request |
||
23 | * @param \Closure $next |
||
24 | * |
||
25 | * @return mixed |
||
26 | */ |
||
27 | public function handle(Request $request, Closure $next) |
||
40 | |||
41 | /** |
||
42 | * @param \Illuminate\Http\Response $response |
||
43 | * @param string $container |
||
44 | * |
||
45 | * @return $this |
||
46 | */ |
||
47 | protected function filterResponse(Response $response, $container) |
||
58 | |||
59 | /** |
||
60 | * @param \Symfony\Component\DomCrawler\Crawler $crawler |
||
61 | * |
||
62 | * @return null|string |
||
63 | */ |
||
64 | protected function makeTitle(Crawler $crawler) |
||
74 | |||
75 | /** |
||
76 | * @param \Symfony\Component\DomCrawler\Crawler $crawler |
||
77 | * @param string $container |
||
78 | * |
||
79 | * @return string |
||
80 | */ |
||
81 | protected function fetchContainer(Crawler $crawler, $container) |
||
91 | |||
92 | /** |
||
93 | * Get the DomCrawler instance. |
||
94 | * |
||
95 | * @param \Illuminate\Http\Response $response |
||
96 | * |
||
97 | * @return \Symfony\Component\DomCrawler\Crawler |
||
98 | */ |
||
99 | protected function getCrawler(Response $response) |
||
107 | |||
108 | |||
109 | /** |
||
110 | * Determine if the request is the result of an InstantClick call. |
||
111 | * |
||
112 | * @return bool |
||
113 | */ |
||
114 | public function isInstantClickRequest(Request $request) |
||
118 | |||
119 | /** |
||
120 | * @param \Illuminate\Http\Response $response |
||
121 | * |
||
122 | * @return $this |
||
123 | * @internal param \Illuminate\Http\Request $request |
||
124 | * |
||
125 | */ |
||
126 | protected function setResponseHeader(Response $response) |
||
132 | |||
133 | } |
||
134 |