public function dispatchAction($action) { $this->action = $action; //---------------------------------------------------------------- //------ VIEW RSS ACTIONS if ($action == ViewAboutPageAction::getActionName()) { $implAction = new ViewAboutPageAction(); // } else { if ($action == ViewBookmarksPageAction::getActionName()) { $implAction = new ViewBookmarksPageAction(); // } else { if ($action == ViewHomePageAction::getActionName()) { $implAction = new ViewHomePageAction(); // } else { if ($action == ViewPlaylistPageAction::getActionName()) { $implAction = new ViewPlaylistPageAction(); // } else { if ($action == ViewSetupPageAction::getActionName()) { $implAction = new ViewSetupPageAction(); // } else { if ($action == ViewWebsitesPageAction::getActionName()) { $implAction = new ViewWebsitesPageAction(); // // //----- VIEW WEB ACTIONS -------------------------------------- } else { if ($action == ViewWebHomePageAction::getActionName()) { $implAction = new ViewWebHomePageAction(); // } else { if ($action == ViewPlaylistWebPageAction::getActionName()) { $implAction = new ViewPlaylistWebPageAction(); // } else { if ($action == ViewScraperMegavideoPageAction::getActionName()) { $implAction = new ViewScraperMegavideoPageAction(); // } else { if ($action == SetupXvodPageAction::getActionName()) { $implAction = new SetupXvodPageAction(); // } else { if ($action == ViewScraperPageAction::getActionName()) { $implAction = new ViewScraperPageAction(); // } else { if ($action == ViewCookiePageAction::getActionName()) { $implAction = new ViewCookiePageAction(); // } else { if ($action == ViewFavouritePageAction::getActionName()) { $implAction = new ViewFavouritePageAction(); // } else { if ($action == ViewInformationPageAction::getActionName()) { $implAction = new ViewInformationPageAction(); } } } } } } } } } } } } } } //---------------------------------------------------------------- //------ NON VIEW RSS ACTIONS if (!$implAction) { if ($action == SaveBookmarkAction::getActionName()) { $implAction = new SaveBookmarkAction(); // } else { if ($action == DeleteBookmarkAction::getActionName()) { $implAction = new DeleteBookmarkAction(); // } else { if ($action == SaveFavouriteWebsiteAction::getActionName()) { $implAction = new SaveFavouriteWebsiteAction(); // } } } } //---------------------------------------------------------------- //Execute action if ($implAction) { $implAction->dispatch(); } else { } }
include_once "action/rss/SaveBookmarkAction.php"; include_once "action/rss/DeleteBookmarkAction.php"; include_once "action/rss/SaveFavouriteWebsiteAction.php"; include_once "action/rss/ViewPlaylistPageAction.php"; include_once "action/web/ViewWebHomePageAction.php"; include_once "action/web/ViewPlaylistWebPageAction.php"; include_once "action/web/ViewScraperMegavideoPageAction.php"; include_once "action/web/SetupXvodPageAction.php"; include_once "action/web/ViewCookiePageAction.php"; include_once "action/web/ViewScraperPageAction.php"; include_once "action/web/ViewFavouritePageAction.php"; include_once "action/web/ViewInformationPageAction.php"; //Megavideo scraper include_once "scraper/megavideo/MegavideoDatabase.php"; include_once "scraper/megavideo/MegavideoLinkBean.php"; //Update action, if needed if (UPDATE_DB) { include_once "config/update.php"; } //Get action and dispatch if (isset($_GET["action"])) { $action = $_GET["action"]; } else { if (isset($_GET["web"])) { $action = ViewWebHomePageAction::getActionName(); } else { $action = ViewHomePageAction::getActionName(); } } $actionDispatcher = new ActionDispatcher(); $actionDispatcher->dispatchAction($action);