public function getVersion($version_key)
    {
        if(is_null($this->version))
        {
            //determine the version
            $headers = \getallheaders();
            if(isset($headers[$version_key]) && is_numeric($headers[$version_key]) && in_array($headers[$version_key], $this->api_versions))
            {
                $version = 'V'.str_replace('.','_',$headers[$version_key]);
            }
            else
            {
                $version = 'V1';
            }
            
            $this->version = $version;
        }
        
        return $this->version;
    }