src/Server.php
protected function detectReturnType()
    {
        if (isset($_GET['cookie'])) {
            $this->returnType = 'none';
            return;
        } elseif (!empty($_GET['return_url'])) {
            $this->returnType = 'redirect';
        } elseif (!empty($_GET['callback'])) {
            $this->returnType = 'jsonp';
        } elseif (strpos($_SERVER['HTTP_ACCEPT'], 'image/') !== false) {
            $this->returnType = 'image';
        } elseif (strpos($_SERVER['HTTP_ACCEPT'], 'application/json') !== false) {
            $this->returnType = 'json';
        }
    }
protected function detectReturnType()
    {
        if (isset($_GET['cookie'])) {
            $this->returnType = 'none';
            return;
        } elseif (!empty($_GET['return_url'])) {
            $this->returnType = 'redirect';
        } elseif (!empty($_GET['callback'])) {
            $this->returnType = 'jsonp';
        } elseif (strpos($_SERVER['HTTP_ACCEPT'], 'image/') !== false) {
            $this->returnType = 'image';
        } elseif (strpos($_SERVER['HTTP_ACCEPT'], 'application/json') !== false) {
            $this->returnType = 'json';
        }
    }
protected function detectReturnType ( ) { if ( isset ( $ _GET [ 'cookie' ] ) ) { $ this -> returnType = 'none' ; return ; } elseif ( ! empty ( $ _GET [ 'return_url' ] ) ) { $ this -> returnType = 'redirect' ; } elseif ( ! empty ( $ _GET [ 'callback' ] ) ) { $ this -> returnType = 'jsonp' ; } elseif ( strpos ( $ _SERVER [ 'HTTP_ACCEPT' ] , 'image/' ) !== false ) { $ this -> returnType = 'image' ; } elseif ( strpos ( $ _SERVER [ 'HTTP_ACCEPT' ] , 'application/json' ) !== false ) { $ this -> returnType = 'json' ; } }
Detect the type for the HTTP response.
Should only be done for an `attach` request.
Detect the type for the HTTP response . Should only be done for an attach request .