static function LingotekOAuthRequestLogger::start in Lingotek Translation 7.6
Same name and namespace in other branches
- 7.7 lib/oauth-php/library/LingotekOAuthRequestLogger.php \LingotekOAuthRequestLogger::start()
- 7.4 lib/oauth-php/library/LingotekOAuthRequestLogger.php \LingotekOAuthRequestLogger::start()
- 7.5 lib/oauth-php/library/LingotekOAuthRequestLogger.php \LingotekOAuthRequestLogger::start()
* Start any logging, checks the system configuration if logging is needed. * *
Parameters
LingotekOAuthRequest $request_object:
8 calls to LingotekOAuthRequestLogger::start()
- LingotekOAuthRequester::requestAccessToken in lib/
oauth-php/ library/ LingotekOAuthRequester.php - * Request an access token from the site belonging to consumer_key. * Before this we got an request token, now we want to exchange it for * an access token. * *
- LingotekOAuthRequester::requestRequestToken in lib/
oauth-php/ library/ LingotekOAuthRequester.php - * Request a request token from the site belonging to consumer_key * *
- LingotekOAuthRequestVerifier::verifyIfSigned in lib/
oauth-php/ library/ LingotekOAuthRequestVerifier.php - * Verify the request if it seemed to be signed. * *
- LingotekOAuthRequestVerifier::__construct in lib/
oauth-php/ library/ LingotekOAuthRequestVerifier.php - * Construct the request to be verified * *
- LingotekOAuthServer::accessToken in lib/
oauth-php/ library/ LingotekOAuthServer.php - * Exchange a request token for an access token. * The exchange is only succesful iff the request token has been authorized. * * Never returns, calls exit() when token is exchanged or when error is returned.
File
- lib/
oauth-php/ library/ LingotekOAuthRequestLogger.php, line 51
Class
- LingotekOAuthRequestLogger
- Log OAuth requests
Code
static function start($request_object = null) {
if (defined('OAUTH_LOG_REQUEST')) {
if (is_null(LingotekOAuthRequestLogger::$enable_logging)) {
LingotekOAuthRequestLogger::$enable_logging = true;
}
if (is_null(LingotekOAuthRequestLogger::$store_log)) {
LingotekOAuthRequestLogger::$store_log = true;
}
}
if (LingotekOAuthRequestLogger::$enable_logging && !LingotekOAuthRequestLogger::$logging) {
LingotekOAuthRequestLogger::$logging = true;
LingotekOAuthRequestLogger::$request_object = $request_object;
ob_start();
// Make sure we flush our log entry when we stop the request (eg on an exception)
register_shutdown_function(array(
'LingotekOAuthRequestLogger',
'flush',
));
}
}