* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ declare(strict_types=1); namespace PrestaShop\PrestaShop\Core\Domain\Security\ValueObject; use PrestaShop\PrestaShop\Core\Domain\Security\Exception\SessionException; /** * Class EmployeeSessionId */ class EmployeeSessionId { /** * @var int */ private $sessionId; /** * @param int $sessionId * * @throws SessionException */ public function __construct(int $sessionId) { if (0 >= $sessionId) { throw new SessionException('Session id must be greater than zero.'); } $this->sessionId = $sessionId; } /** * @return int */ public function getValue(): int { return $this->sessionId; } }