mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-11 09:43:13 +08:00
Replaced more ussages of AnnotatedFactory by ConfigAbstractFactory
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
<?php
|
||||
namespace Shlinkio\Shlink\Core\Action;
|
||||
|
||||
use Acelaya\ZsmAnnotatedServices\Annotation\Inject;
|
||||
use Interop\Http\ServerMiddleware\DelegateInterface;
|
||||
use Interop\Http\ServerMiddleware\MiddlewareInterface;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Shlinkio\Shlink\Common\Service\PreviewGenerator;
|
||||
use Shlinkio\Shlink\Common\Service\PreviewGeneratorInterface;
|
||||
use Shlinkio\Shlink\Common\Util\ResponseUtilsTrait;
|
||||
use Shlinkio\Shlink\Core\Exception\InvalidShortCodeException;
|
||||
use Shlinkio\Shlink\Core\Service\UrlShortener;
|
||||
use Shlinkio\Shlink\Core\Service\UrlShortenerInterface;
|
||||
|
||||
class PreviewAction implements MiddlewareInterface
|
||||
@@ -26,13 +23,6 @@ class PreviewAction implements MiddlewareInterface
|
||||
*/
|
||||
private $urlShortener;
|
||||
|
||||
/**
|
||||
* PreviewAction constructor.
|
||||
* @param PreviewGeneratorInterface $previewGenerator
|
||||
* @param UrlShortenerInterface $urlShortener
|
||||
*
|
||||
* @Inject({PreviewGenerator::class, UrlShortener::class})
|
||||
*/
|
||||
public function __construct(PreviewGeneratorInterface $previewGenerator, UrlShortenerInterface $urlShortener)
|
||||
{
|
||||
$this->previewGenerator = $previewGenerator;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
namespace Shlinkio\Shlink\Core\Action;
|
||||
|
||||
use Acelaya\ZsmAnnotatedServices\Annotation\Inject;
|
||||
use Endroid\QrCode\QrCode;
|
||||
use Interop\Http\ServerMiddleware\DelegateInterface;
|
||||
use Interop\Http\ServerMiddleware\MiddlewareInterface;
|
||||
@@ -11,7 +10,6 @@ use Psr\Log\LoggerInterface;
|
||||
use Psr\Log\NullLogger;
|
||||
use Shlinkio\Shlink\Common\Response\QrCodeResponse;
|
||||
use Shlinkio\Shlink\Core\Exception\InvalidShortCodeException;
|
||||
use Shlinkio\Shlink\Core\Service\UrlShortener;
|
||||
use Shlinkio\Shlink\Core\Service\UrlShortenerInterface;
|
||||
use Zend\Expressive\Router\RouterInterface;
|
||||
|
||||
@@ -30,14 +28,6 @@ class QrCodeAction implements MiddlewareInterface
|
||||
*/
|
||||
private $logger;
|
||||
|
||||
/**
|
||||
* QrCodeAction constructor.
|
||||
* @param RouterInterface $router
|
||||
* @param UrlShortenerInterface $urlShortener
|
||||
* @param LoggerInterface $logger
|
||||
*
|
||||
* @Inject({RouterInterface::class, UrlShortener::class, "Logger_Shlink"})
|
||||
*/
|
||||
public function __construct(
|
||||
RouterInterface $router,
|
||||
UrlShortenerInterface $urlShortener,
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
<?php
|
||||
namespace Shlinkio\Shlink\Core\Action;
|
||||
|
||||
use Acelaya\ZsmAnnotatedServices\Annotation\Inject;
|
||||
use Interop\Http\ServerMiddleware\DelegateInterface;
|
||||
use Interop\Http\ServerMiddleware\MiddlewareInterface;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Psr\Log\NullLogger;
|
||||
use Shlinkio\Shlink\Core\Service\UrlShortener;
|
||||
use Shlinkio\Shlink\Core\Service\UrlShortenerInterface;
|
||||
use Shlinkio\Shlink\Core\Service\VisitsTracker;
|
||||
use Shlinkio\Shlink\Core\Service\VisitsTrackerInterface;
|
||||
use Zend\Diactoros\Response\RedirectResponse;
|
||||
|
||||
@@ -29,14 +26,6 @@ class RedirectAction implements MiddlewareInterface
|
||||
*/
|
||||
private $logger;
|
||||
|
||||
/**
|
||||
* RedirectMiddleware constructor.
|
||||
* @param UrlShortenerInterface $urlShortener
|
||||
* @param VisitsTrackerInterface $visitTracker
|
||||
* @param LoggerInterface|null $logger
|
||||
*
|
||||
* @Inject({UrlShortener::class, VisitsTracker::class, "Logger_Shlink"})
|
||||
*/
|
||||
public function __construct(
|
||||
UrlShortenerInterface $urlShortener,
|
||||
VisitsTrackerInterface $visitTracker,
|
||||
|
||||
Reference in New Issue
Block a user