shlink/module/Rest/src/Action/AbstractRestAction.php

24 lines
573 B
PHP
Raw Normal View History

2016-07-05 20:19:23 +03:00
<?php
2017-10-12 11:13:20 +03:00
declare(strict_types=1);
2016-07-19 18:07:59 +03:00
namespace Shlinkio\Shlink\Rest\Action;
2016-07-05 20:19:23 +03:00
use Fig\Http\Message\RequestMethodInterface;
use Fig\Http\Message\StatusCodeInterface;
2018-03-26 19:49:28 +03:00
use Psr\Http\Server\RequestHandlerInterface;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
2016-07-05 20:19:23 +03:00
2018-03-26 19:49:28 +03:00
abstract class AbstractRestAction implements RequestHandlerInterface, RequestMethodInterface, StatusCodeInterface
2016-07-05 20:19:23 +03:00
{
/**
* @var LoggerInterface
*/
protected $logger;
public function __construct(LoggerInterface $logger = null)
{
$this->logger = $logger ?: new NullLogger();
}
2016-07-05 20:19:23 +03:00
}