Lsrur\Inspector\inspector::getInjectorType PHP Method

getInjectorType() protected method

Determine the injector type
protected getInjectorType ( [type] $request, [type] $response ) : [type]
$request [type]
$response [type]
return [type]
    protected function getInjectorType($request, $response)
    {
        if ($request->wantsJson() || get_class($response) == "Illuminate\\Http\\JsonResponse") {
            $this->injectorType = 'json';
        } elseif ($response->isRedirect()) {
            $this->injectorType = 'redirect';
        } elseif (get_class($response) == "Illuminate\\Http\\Response" && is_object($response->getOriginalContent()) && get_class($response->getOriginalContent()) == 'Illuminate\\View\\View') {
            $this->injectorType = 'view';
        }
        return isset($this->injectorType);
    }