Class Config
Configure how you plan to connect to the Dropbox API (your app information,
your user's locale, etc).
Methods summary
public
Dropbox\AppInfo
|
#
getAppInfo( )
Whatever AppInfo was passed into the constructor.
Whatever AppInfo was passed into the constructor.
Returns
|
public
string
|
#
getClientIdentifier( )
An identifier for the API client, typically of the form "Name/Version". This
is used to set the HTTP User-Agent header when making API requests.
Example: "PhotoEditServer/1.3"
An identifier for the API client, typically of the form "Name/Version". This
is used to set the HTTP User-Agent header when making API requests.
Example: "PhotoEditServer/1.3"
If you're the author a higher-level library on top of the basic SDK, and the
"Photo Edit" app's server code is using your library to access Dropbox, you
should append your library's name and version to form the full identifier. For
example, if your library is called "File Picker", you might set this field to:
"PhotoEditServer/1.3
FilePicker/0.1-beta"
The exact format of the User-Agent header is described in section 3.8 of the HTTP
specification.
Note that underlying HTTP client may append other things to the
User-Agent , such as the name of the library being used to actually
make the HTTP request (such as cURL).
Returns
string
|
public static
string
|
#
getClosestSupportedLocale( null|string $locale = null )
Given a locale string, returns the closest supported locale that the Dropbox
servers support. You can then use that locale string as an argument to the
constructor.
Given a locale string, returns the closest supported locale that the Dropbox
servers support. You can then use that locale string as an argument to the
constructor.
If you omit the $locale argument (or pass in null), we'll try using the
default locale from Locale::getDefault().
Parameters
- $locale
null|string $locale
Returns
string
|
public
string
|
#
getUserLocale( )
The locale of the user of your application. Some API calls return localized
data and error messages; this "user locale" setting determines which locale the
server should use to localize those strings.
The locale of the user of your application. Some API calls return localized
data and error messages; this "user locale" setting determines which locale the
server should use to localize those strings.
Returns
string
|
public
|
|