Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<?php | ||
|
||
declare(strict_types = 1); | ||
|
||
namespace Fusio\Model\Consumer; | ||
|
||
|
||
class Page implements \JsonSerializable | ||
{ | ||
/** | ||
* @var int|null | ||
*/ | ||
protected $id; | ||
/** | ||
* @var string|null | ||
*/ | ||
protected $title; | ||
/** | ||
* @var string|null | ||
*/ | ||
protected $slug; | ||
/** | ||
* @var string|null | ||
*/ | ||
protected $content; | ||
/** | ||
* @param int|null $id | ||
*/ | ||
public function setId(?int $id) : void | ||
{ | ||
$this->id = $id; | ||
} | ||
/** | ||
* @return int|null | ||
*/ | ||
public function getId() : ?int | ||
{ | ||
return $this->id; | ||
} | ||
/** | ||
* @param string|null $title | ||
*/ | ||
public function setTitle(?string $title) : void | ||
{ | ||
$this->title = $title; | ||
} | ||
/** | ||
* @return string|null | ||
*/ | ||
public function getTitle() : ?string | ||
{ | ||
return $this->title; | ||
} | ||
/** | ||
* @param string|null $slug | ||
*/ | ||
public function setSlug(?string $slug) : void | ||
{ | ||
$this->slug = $slug; | ||
} | ||
/** | ||
* @return string|null | ||
*/ | ||
public function getSlug() : ?string | ||
{ | ||
return $this->slug; | ||
} | ||
/** | ||
* @param string|null $content | ||
*/ | ||
public function setContent(?string $content) : void | ||
{ | ||
$this->content = $content; | ||
} | ||
/** | ||
* @return string|null | ||
*/ | ||
public function getContent() : ?string | ||
{ | ||
return $this->content; | ||
} | ||
public function jsonSerialize() | ||
{ | ||
return (object) array_filter(array('id' => $this->id, 'title' => $this->title, 'slug' => $this->slug, 'content' => $this->content), static function ($value) : bool { | ||
return $value !== null; | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
declare(strict_types = 1); | ||
|
||
namespace Fusio\Model\Consumer; | ||
|
||
/** | ||
* @extends \Fusio\Model\Collection<Page> | ||
*/ | ||
class Page_Collection extends \Fusio\Model\Collection | ||
{ | ||
} |