From a76ae7267518e081facb0c911390f9e2bed5f51c Mon Sep 17 00:00:00 2001 From: Josh Bruce Date: Mon, 29 May 2023 18:03:28 -0400 Subject: [PATCH] add: Ability to get underlying object --- src/ObjectsFromJson/PrivateObject.php | 2 +- src/ObjectsFromJson/PublicMeta.php | 2 +- src/ObjectsFromJson/PublicObject.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ObjectsFromJson/PrivateObject.php b/src/ObjectsFromJson/PrivateObject.php index 6ea7a54..a4d9373 100644 --- a/src/ObjectsFromJson/PrivateObject.php +++ b/src/ObjectsFromJson/PrivateObject.php @@ -61,7 +61,7 @@ public function hasProperty(string $property): bool return property_exists($object, $property); } - private function object(): StdClass + public function object(): StdClass { if (isset($this->object) === false) { $json = $this->publicJson->toString(); diff --git a/src/ObjectsFromJson/PublicMeta.php b/src/ObjectsFromJson/PublicMeta.php index 7d2df75..638dea3 100644 --- a/src/ObjectsFromJson/PublicMeta.php +++ b/src/ObjectsFromJson/PublicMeta.php @@ -58,7 +58,7 @@ public function hasProperty(string $property): bool return property_exists($object, $property); } - private function object(): StdClass + public function object(): StdClass { if (isset($this->object) === false) { $json = $this->publicMeta->toString(); diff --git a/src/ObjectsFromJson/PublicObject.php b/src/ObjectsFromJson/PublicObject.php index cf93532..7d73698 100644 --- a/src/ObjectsFromJson/PublicObject.php +++ b/src/ObjectsFromJson/PublicObject.php @@ -61,7 +61,7 @@ public function hasProperty(string $property): bool return property_exists($object, $property); } - private function object(): StdClass + public function object(): StdClass { if (isset($this->object) === false) { $json = $this->publicJson->toString();