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