Skip to content

Commit

Permalink
update variables
Browse files Browse the repository at this point in the history
Lyrisbee committed Nov 12, 2023

Verified

This commit was signed with the committer’s verified signature.
Lyrisbee lyrisbee
1 parent d598446 commit 596818f
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/Objects/Post.php
Original file line number Diff line number Diff line change
@@ -20,6 +20,8 @@ class Post extends WordPressObject

public string $modified_gmt;

public ?string $password;

public string $slug;

public string $status;
2 changes: 2 additions & 0 deletions src/Objects/RenderObject.php
Original file line number Diff line number Diff line change
@@ -4,6 +4,8 @@

class RenderObject extends WordPressObject
{
public ?string $raw;

public string $rendered;

public ?bool $protected;
8 changes: 4 additions & 4 deletions src/Objects/WordPressObject.php
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 596818f

Please sign in to comment.