src/Twitter/Connections/AppConnection.php
protected function constructRequestOptions($params)
    {
        //empty array
        $options = array();

        //add Bearer Token to the header
        $headers = array(
            'Authorization' => 'Bearer ' . $this->credentials->getBearerToken()
        );

        //if query parameters not supplied, continue.
        if(!is_null($params))
        {
            //Add query parameters to options.
            $options['query'] = $params;
        }

        //Add headers to the request.
        $options['headers'] = $headers;

        //return constructed options
        return $options;
    }
protected function constructRequestOptions($params)
    {
        //empty array
        $options = array();

        //add Bearer Token to the header
        $headers = array(
            'Authorization' => 'Bearer ' . $this->credentials->getBearerToken()
        );

        //if query parameters not supplied, continue.
        if(!is_null($params))
        {
            //Add query parameters to options.
            $options['query'] = $params;
        }

        //Add headers to the request.
        $options['headers'] = $headers;

        //return constructed options
        return $options;
    }
protected function constructRequestOptions ( $ params ) { //empty array $ options = array ( ) ; //add Bearer Token to the header $ headers = array ( 'Authorization' => 'Bearer ' . $ this -> credentials -> getBearerToken ( ) ) ; //if query parameters not supplied, continue. if ( ! is_null ( $ params ) ) { //Add query parameters to options. $ options [ 'query' ] = $ params ; } //Add headers to the request. $ options [ 'headers' ] = $ headers ; //return constructed options return $ options ; }
Constructs an options array that is sent with the request.

Uses Bearer Token since this is an AppConnection.

@return array options for the request
Constructs an options array that is sent with the request .