/** * Tests if a session exists before showing the header. **/ public function controlHeader() { $pageView = new PageView(); if (isset($_SESSION['infoUser'])) { $pageView->showHeader(true); } else { $pageView->showHeader(false); } }