public function __construct() { session_start(); $this->facade = MainFactory::createFacade(); define('SERVLET', 1); //Set the user as online if they are logged in if (isset($_SESSION["user"])) { $this->facade->setOnline($_SESSION["user"]->getUsername()); $this->isLoggedIn = true; } //Set up header / footer contents $this->headerContents = $this->facade->getHeaderContents(); $this->footerContents = $this->facade->getFooterContents(); //Get the home data to return $this->homeContents = $this->facade->getHomeContents(); $this->onlineUsers = $this->facade->getOnlineUsers(); }