From b0e69213daf2b567cd51157d2ea5501768116409 Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Wed, 20 Jan 2021 14:40:16 +0300 Subject: [PATCH] deleted dependency by internal abstract class (#7) Co-authored-by: Akolzin Dmitry --- .../Deserialization/JsonDeserializationVisitor.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Component/JMS/Visitor/Deserialization/JsonDeserializationVisitor.php b/src/Component/JMS/Visitor/Deserialization/JsonDeserializationVisitor.php index 4956712..98a1a62 100644 --- a/src/Component/JMS/Visitor/Deserialization/JsonDeserializationVisitor.php +++ b/src/Component/JMS/Visitor/Deserialization/JsonDeserializationVisitor.php @@ -12,6 +12,7 @@ use JMS\Serializer\AbstractVisitor; use JMS\Serializer\Exception\LogicException; use JMS\Serializer\Exception\NotAcceptableException; use JMS\Serializer\Exception\RuntimeException; +use JMS\Serializer\GraphNavigatorInterface; use JMS\Serializer\Metadata\ClassMetadata; use JMS\Serializer\Metadata\PropertyMetadata; use JMS\Serializer\Visitor\DeserializationVisitorInterface; @@ -24,7 +25,7 @@ use SplStack; * @category JsonDeserializationVisitor * @package RetailCrm\Component\JMS\Visitor\Deserialization */ -class JsonDeserializationVisitor extends AbstractVisitor implements DeserializationVisitorInterface +class JsonDeserializationVisitor implements DeserializationVisitorInterface { /** * @var int @@ -46,6 +47,11 @@ class JsonDeserializationVisitor extends AbstractVisitor implements Deserializat */ private $currentObject; + /** + * @var GraphNavigatorInterface + */ + protected $navigator; + public function __construct( int $options = 0, int $depth = 512 @@ -308,4 +314,9 @@ class JsonDeserializationVisitor extends AbstractVisitor implements Deserializat throw new RuntimeException('Could not decode JSON.'); } } + + public function setNavigator(GraphNavigatorInterface $navigator): void + { + $this->navigator = $navigator; + } }