. * * Used to check/generate entities for the Friendica codebase */ declare(strict_types=1); namespace Friendica\Domain\Entity; use Friendica\BaseEntity; /** * Entity class for table locks */ class Locks extends BaseEntity { /** * @var int * sequential ID */ private $id; /** * @var string */ private $name = ''; /** * @var bool */ private $locked = '0'; /** * @var int * Process ID */ private $pid = '0'; /** * @var string * datetime of cache expiration */ private $expires = '0001-01-01 00:00:00'; /** * {@inheritDoc} */ public function toArray() { return [ 'id' => $this->id, 'name' => $this->name, 'locked' => $this->locked, 'pid' => $this->pid, 'expires' => $this->expires, ]; } /** * @return int * Get sequential ID */ public function getId() { return $this->id; } /** * @return string * Get */ public function getName() { return $this->name; } /** * @param string $name * Set */ public function setName(string $name) { $this->name = $name; } /** * @return bool * Get */ public function getLocked() { return $this->locked; } /** * @param bool $locked * Set */ public function setLocked(bool $locked) { $this->locked = $locked; } /** * @return int * Get Process ID */ public function getPid() { return $this->pid; } /** * @param int $pid * Set Process ID */ public function setPid(int $pid) { $this->pid = $pid; } /** * @return string * Get datetime of cache expiration */ public function getExpires() { return $this->expires; } /** * @param string $expires * Set datetime of cache expiration */ public function setExpires(string $expires) { $this->expires = $expires; } }