for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Uxmp\Core\Orm\Model;
/**
* @Entity(repositoryClass="\Uxmp\Core\Orm\Repository\SessionRepository")
* @Table(name="session")
*/
class Session implements SessionInterface
{
* @Id
* @Column(type="integer")
* @GeneratedValue
private int $id;
* @Column(type="string")
private string $subject = '';
* @Column(type="boolean")
private bool $active = false;
private int $user_id = 0;
* @ManyToOne(targetEntity="User")
* @JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
private UserInterface $user;
public function getId(): int
return $this->id;
}
public function getSubject(): string
return $this->subject;
public function setSubject(string $subject): SessionInterface
$this->subject = $subject;
return $this;
public function getActive(): bool
return $this->active;
public function setActive(bool $active): SessionInterface
$this->active = $active;
public function getUser(): UserInterface
return $this->user;
public function setUser(UserInterface $user): SessionInterface
$this->user = $user;