1
0
mirror of synced 2024-11-28 07:46:01 +03:00

deleted dependency by internal abstract class (#7)

Co-authored-by: Akolzin Dmitry <akolzin@retailcrm.ru>
This commit is contained in:
Akolzin Dmitry 2021-01-20 14:40:16 +03:00 committed by GitHub
parent 8887145377
commit b0e69213da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ use JMS\Serializer\AbstractVisitor;
use JMS\Serializer\Exception\LogicException; use JMS\Serializer\Exception\LogicException;
use JMS\Serializer\Exception\NotAcceptableException; use JMS\Serializer\Exception\NotAcceptableException;
use JMS\Serializer\Exception\RuntimeException; use JMS\Serializer\Exception\RuntimeException;
use JMS\Serializer\GraphNavigatorInterface;
use JMS\Serializer\Metadata\ClassMetadata; use JMS\Serializer\Metadata\ClassMetadata;
use JMS\Serializer\Metadata\PropertyMetadata; use JMS\Serializer\Metadata\PropertyMetadata;
use JMS\Serializer\Visitor\DeserializationVisitorInterface; use JMS\Serializer\Visitor\DeserializationVisitorInterface;
@ -24,7 +25,7 @@ use SplStack;
* @category JsonDeserializationVisitor * @category JsonDeserializationVisitor
* @package RetailCrm\Component\JMS\Visitor\Deserialization * @package RetailCrm\Component\JMS\Visitor\Deserialization
*/ */
class JsonDeserializationVisitor extends AbstractVisitor implements DeserializationVisitorInterface class JsonDeserializationVisitor implements DeserializationVisitorInterface
{ {
/** /**
* @var int * @var int
@ -46,6 +47,11 @@ class JsonDeserializationVisitor extends AbstractVisitor implements Deserializat
*/ */
private $currentObject; private $currentObject;
/**
* @var GraphNavigatorInterface
*/
protected $navigator;
public function __construct( public function __construct(
int $options = 0, int $options = 0,
int $depth = 512 int $depth = 512
@ -308,4 +314,9 @@ class JsonDeserializationVisitor extends AbstractVisitor implements Deserializat
throw new RuntimeException('Could not decode JSON.'); throw new RuntimeException('Could not decode JSON.');
} }
} }
public function setNavigator(GraphNavigatorInterface $navigator): void
{
$this->navigator = $navigator;
}
} }