PageFactory.inc 391 B

123456789101112131415161718
  1. <?php
  2. class PageFactory {
  3. public static function getInstance() {
  4. return new PageFactory();
  5. }
  6. public function create($action) {
  7. switch($action) {
  8. case "generic":
  9. return GenericPage::getInstance();
  10. case "submit":
  11. return SubmitPage::getInstance();
  12. case "ajaxsubmit":
  13. return AjaxSubmitPage::getInstance();
  14. default:
  15. return NotFoundPage::getInstance();
  16. }
  17. }
  18. }