protected function __construct() { $this->session = new Session(); $this->session->start(); $userId = $this->getUserId(); if ($userId !== null) { $users = new Users(); $this->userInfo = $users->getUserInfo($userId); } }