diff --git a/src/Objects/Post.php b/src/Objects/Post.php index c3a1815..df48bb1 100644 --- a/src/Objects/Post.php +++ b/src/Objects/Post.php @@ -20,6 +20,8 @@ class Post extends WordPressObject public string $modified_gmt; + public ?string $password; + public string $slug; public string $status; diff --git a/src/Objects/RenderObject.php b/src/Objects/RenderObject.php index f9836f6..70e9d71 100644 --- a/src/Objects/RenderObject.php +++ b/src/Objects/RenderObject.php @@ -4,6 +4,8 @@ class RenderObject extends WordPressObject { + public ?string $raw; + public string $rendered; public ?bool $protected; diff --git a/src/Objects/WordPressObject.php b/src/Objects/WordPressObject.php index 298a91e..06aeb95 100644 --- a/src/Objects/WordPressObject.php +++ b/src/Objects/WordPressObject.php @@ -14,9 +14,9 @@ abstract class WordPressObject private array $_map = []; final public function __construct( - protected readonly stdClass $raw, + protected readonly stdClass $rawData, ) { - foreach (get_object_vars($this->raw) as $key => $value) { + foreach (get_object_vars($this->rawData) as $key => $value) { $this->{$key} = $value; } } @@ -26,9 +26,9 @@ public static function from(stdClass $data): static return new static($data); } - public function getRaw(): stdClass + public function getRawData(): stdClass { - return $this->raw; + return $this->rawData; } public function __set(string $key, mixed $value): void