forked from LiveCarta/PayPal-PHP-SDK
Updating setupLogger to use classname as string
- `:class` not allowed in PHP 5.3 and 5.4
This commit is contained in:
@@ -87,7 +87,7 @@ class PayPalLoggingManager
|
||||
|
||||
private function setupLogger($config = array()) {
|
||||
// Checks if custom adapter defined, and is it an implementation of @LoggerInterface
|
||||
$loggingAdapter = array_key_exists('log.Adapter', $config) && in_array(LoggerInterface::class, class_implements($config['log.Adapter']))? $config['log.Adapter'] : PayPalLogger::class;
|
||||
$loggingAdapter = array_key_exists('log.Adapter', $config) && in_array('\Psr\Log\LoggerInterface', class_implements($config['log.Adapter']))? $config['log.Adapter'] : '\PayPal\Log\PayPalLogger';
|
||||
$this->logger = new $loggingAdapter();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user