private function dropbox::_build_header in Dropbox Client 7.3
Same name and namespace in other branches
- 7.4 dropbox.php \dropbox::_build_header()
- 7 dropbox.php \dropbox::_build_header()
- 7.2 dropbox.php \dropbox::_build_header()
3 calls to dropbox::_build_header()
File
- ./
dropbox.php, line 425
Class
Code
private function _build_header($url, $method, $prepend, $append, $overwrite = array(), $algo = OAUTH_ALGORITHMS::HMAC_SHA1) {
$str = $prepend === false ? '' : $prepend;
foreach ($this->_header as $key => $value) {
if (array_key_exists($key, $overwrite)) {
$str .= $key . ': ' . $overwrite[$key] . self::LINE_END;
}
else {
$str .= $key . ': ' . $value . self::LINE_END;
}
}
if ($this->_access !== false && $url !== false) {
$str .= get_auth_header($url, $this->_consumer['key'], $this->_consumer['secret'], $this->_access, $method, isset($algo) ? $algo : $this->_consumer['algorithm'], $this->_access['oauth_token'], $this->_access['oauth_token_secret']);
}
$str .= $append === false ? '' : $append;
return $str;
}