From 991c05fa11161d3a77bb130368f73e18b2b70481 Mon Sep 17 00:00:00 2001 From: Pavel Bondarovich Date: Sat, 16 May 2020 17:04:17 +0700 Subject: [PATCH] Added ImageHandlingInterface for autowiring --- Resources/config/services.yml | 2 ++ Services/ImageHandling.php | 2 +- Services/ImageHandlingInterface.php | 29 +++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 Services/ImageHandlingInterface.php diff --git a/Resources/config/services.yml b/Resources/config/services.yml index 84c2ed0..86100b5 100644 --- a/Resources/config/services.yml +++ b/Resources/config/services.yml @@ -18,6 +18,8 @@ services: - '%gregwar_image.throw_exception%' - '%gregwar_image.fallback_image%' + Gregwar\ImageBundle\Services\ImageHandlingInterface: '@image.handling' + # Helper Twig twig.extension.image: class: Gregwar\ImageBundle\Extensions\ImageTwig diff --git a/Services/ImageHandling.php b/Services/ImageHandling.php index f56a1fd..fe8acb1 100644 --- a/Services/ImageHandling.php +++ b/Services/ImageHandling.php @@ -14,7 +14,7 @@ * @author Gregwar * @author Sullivan Senechal */ -class ImageHandling +class ImageHandling implements ImageHandlingInterface { /** * @var string diff --git a/Services/ImageHandlingInterface.php b/Services/ImageHandlingInterface.php new file mode 100644 index 0000000..4b90bfa --- /dev/null +++ b/Services/ImageHandlingInterface.php @@ -0,0 +1,29 @@ +