filestack/mixins/CommonMixin.php
protected function getSourceHeaders()
    {
        $headers = [];

        if (!$this->user_agent_header || !$this->source_header) {
            $version = trim(file_get_contents(__DIR__ . '/../../VERSION'));

            if (!$this->user_agent_header) {
                $this->user_agent_header = sprintf('filestack-php-%s',
                    $version);
            }

            if (!$this->source_header) {
                $this->source_header = sprintf('PHP-%s',
                    $version);
            }
        }

        $headers['user-agent'] = $this->user_agent_header;
        $headers['filestack-source'] = $this->source_header;

        //user_agent_header
        return $headers;
    }
protected function getSourceHeaders()
    {
        $headers = [];

        if (!$this->user_agent_header || !$this->source_header) {
            $version = trim(file_get_contents(__DIR__ . '/../../VERSION'));

            if (!$this->user_agent_header) {
                $this->user_agent_header = sprintf('filestack-php-%s',
                    $version);
            }

            if (!$this->source_header) {
                $this->source_header = sprintf('PHP-%s',
                    $version);
            }
        }

        $headers['user-agent'] = $this->user_agent_header;
        $headers['filestack-source'] = $this->source_header;

        //user_agent_header
        return $headers;
    }
protected function getSourceHeaders ( ) { $ headers = [ ] ; if ( ! $ this -> user_agent_header || ! $ this -> source_header ) { $ version = trim ( file_get_contents ( __DIR__ . '/../../VERSION' ) ) ; if ( ! $ this -> user_agent_header ) { $ this -> user_agent_header = sprintf ( 'filestack-php-%s' , $ version ) ; } if ( ! $ this -> source_header ) { $ this -> source_header = sprintf ( 'PHP-%s' , $ version ) ; } } $ headers [ 'user-agent' ] = $ this -> user_agent_header ; $ headers [ 'filestack-source' ] = $ this -> source_header ; //user_agent_header return $ headers ; }
Get source header
Get source header