public function start() { $renderView = new RenderView(); $resultView = new ResultView(); $addView = new AddView(); $connectionDAL = new ConnectionDAL(); $artistDAL = new ArtistDAL($connectionDAL); $songDAL = new SongDAL($connectionDAL, $artistDAL); $addModel = new AddModel($artistDAL, $songDAL); $loginModel = new LoginModel(); $deleteModel = new DeleteModel($songDAL, $artistDAL); $searchModel = new SearchModel($deleteModel, $connectionDAL); $searchView = new SearchView($searchModel, $loginModel); $searchController = new SearchController($renderView, $searchView, $searchModel, $loginModel, $deleteModel, $resultView); $addController = new AddController($renderView, $addView, $addModel); $loginView = new LoginView(); $loginController = new LoginController($renderView, $loginView, $loginModel); $navigationView = new NavigationView(); $page = $navigationView->checkPage(); if ($page == "/" || $page == "/index.php" || $page == "/project/") { $searchController->Start(); } else { if ($page == "login") { $loginController->Start(); } else { if ($page == "add") { $addController->Start(); } else { $searchController->Chords($page); } } } }