Пример #1
0
 public function run()
 {
     $mainView = new \view\MainView();
     $addPlaylistView = new \view\AddPlaylistView();
     if ($this->navigationView->clickedPlaylists()) {
         $playlistController = new \controller\PlaylistController();
         $content = $playlistController->playlistAction();
         // $content = $addPlaylistView->playlistInputHTML();
     } else {
         $content = "<h1>Yo!</h1>";
     }
     $mainView->renderPage($content);
 }
Пример #2
0
 public function run()
 {
     $mainView = new \view\MainView();
     $playlistController = new \controller\PlaylistController();
     $content;
     if ($this->urlView->clickedPlaylists()) {
         $content = $playlistController->playlistAction();
     } else {
         if ($this->urlView->clickedSpecificPlaylist()) {
             $content = $playlistController->playlistAction();
         } else {
             if ($this->urlView->clickedSpecificTrack()) {
                 $content = $playlistController->playlistAction();
             } else {
                 $content = $mainView->welcomeHTML();
             }
         }
     }
     $mainView->renderPage($content);
 }