for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* Copyright (c) Nate Brunette.
* Distributed under the MIT License (http://opensource.org/licenses/MIT)
*/
declare(strict_types=1);
namespace Tebru\Gson\Internal;
use Tebru\Gson\Exclusion\SerializationExclusionData;
use Tebru\Gson\JsonWritable;
/**
* Class DefaultSerializationExclusionData
*
* @author Nate Brunette <[email protected]>
class DefaultSerializationExclusionData implements SerializationExclusionData
{
* @var object
private $objectToSerialize;
* @var JsonWritable
private $writer;
* Constructor
* @param object $objectToSerialize
* @param JsonWritable $writer
public function __construct($objectToSerialize, JsonWritable $writer)
$this->objectToSerialize = $objectToSerialize;
$this->writer = $writer;
}
* Get the object currently being serialized
* @return object
public function getObjectToSerialize()
return $this->objectToSerialize;
* Get the current path formatted as json xpath
* @return string
public function getPath(): string
return $this->writer->getPath();