Replace Logger:: with logger property
This commit is contained in:
parent
5bfcc8b91c
commit
a9ddd6687b
1 changed files with 11 additions and 7 deletions
|
@ -4,12 +4,12 @@ namespace Friendica\Module\Api;
|
||||||
|
|
||||||
use Friendica\App\Arguments;
|
use Friendica\App\Arguments;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Logger;
|
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
use Friendica\Object\Api\Mastodon\Error;
|
use Friendica\Object\Api\Mastodon\Error;
|
||||||
use Friendica\Util\Arrays;
|
use Friendica\Util\Arrays;
|
||||||
use Friendica\Util\HTTPInputData;
|
use Friendica\Util\HTTPInputData;
|
||||||
use Friendica\Util\XML;
|
use Friendica\Util\XML;
|
||||||
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is used to format and return API responses
|
* This class is used to format and return API responses
|
||||||
|
@ -20,15 +20,19 @@ class ApiResponse
|
||||||
protected $l10n;
|
protected $l10n;
|
||||||
/** @var Arguments */
|
/** @var Arguments */
|
||||||
protected $args;
|
protected $args;
|
||||||
|
/** @var LoggerInterface */
|
||||||
|
protected $logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param L10n $l10n
|
* @param L10n $l10n
|
||||||
* @param Arguments $args
|
* @param Arguments $args
|
||||||
|
* @param LoggerInterface $logger
|
||||||
*/
|
*/
|
||||||
public function __construct(L10n $l10n, Arguments $args)
|
public function __construct(L10n $l10n, Arguments $args, LoggerInterface $logger)
|
||||||
{
|
{
|
||||||
$this->l10n = $l10n;
|
$this->l10n = $l10n;
|
||||||
$this->args = $args;
|
$this->args = $args;
|
||||||
|
$this->logger = $logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -201,7 +205,7 @@ class ApiResponse
|
||||||
public function unsupported(string $method = 'all')
|
public function unsupported(string $method = 'all')
|
||||||
{
|
{
|
||||||
$path = $this->args->getQueryString();
|
$path = $this->args->getQueryString();
|
||||||
Logger::info('Unimplemented API call',
|
$this->logger->info('Unimplemented API call',
|
||||||
[
|
[
|
||||||
'method' => $method,
|
'method' => $method,
|
||||||
'path' => $path,
|
'path' => $path,
|
||||||
|
|
Loading…
Reference in a new issue