for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace AbterPhp\Website\Domain\Entities;
use AbterPhp\Framework\Domain\Entities\IStringerEntity;
class BlockLayout implements IStringerEntity
{
/** @var string */
protected $id;
protected $name;
protected $identifier;
protected $body;
/**
* BlockLayout constructor.
*
* @param string $id
* @param string $name
* @param string $identifier
* @param string $body
*/
public function __construct(string $id, string $name, string $identifier, string $body)
$this->id = $id;
$this->name = $name;
$this->identifier = $identifier;
$this->body = $body;
}
* @return string
public function getId()
return $this->id;
public function setId($id)
public function getName(): string
return $this->name;
* @return $this
public function setName(string $name): BlockLayout
return $this;
public function getIdentifier(): string
return $this->identifier;
public function setIdentifier(string $identifier): BlockLayout
public function getBody(): string
return $this->body;
public function setBody(string $body): BlockLayout
public function __toString(): string
return $this->getIdentifier();
* @return array|null
public function toData(): ?array
return [
'id' => $this->getId(),
'identifier' => $this->getIdentifier(),
'body' => $this->getBody(),
];
public function toJSON(): string
return json_encode($this->toData());