123456789101112131415161718 |
- <?php
- class PageFactory {
- public static function getInstance() {
- return new PageFactory();
- }
- public function create($action) {
- switch($action) {
- case "generic":
- return GenericPage::getInstance();
- case "submit":
- return SubmitPage::getInstance();
- case "ajaxsubmit":
- return AjaxSubmitPage::getInstance();
- default:
- return NotFoundPage::getInstance();
- }
- }
- }
|