Advertisement
terorama

mvc / setupscontroller.inc.php

Dec 22nd, 2012
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.14 KB | None | 0 0
  1. <?php
  2.  
  3. //-------------------------------------------------
  4. //            setups controller
  5. //-------------------------------------------------
  6. class SetupsController extends Controller {
  7.  
  8.    protected $_routes = array(
  9.                        
  10.                         'start' => 'action=start_setup',
  11.                         'create_tables' => 'action=create_tables',
  12.                         'finish' => 'action=finish_setup'
  13.                         );
  14.  
  15.    //-----------------------------------   declare params
  16.    protected function declareParams() {
  17.    }
  18.    //-----------------------------------   common Dispatch
  19.    protected function commonDispatch() {
  20.    }
  21.    
  22.    //-----------------------------------   start setup
  23.    public function start_setup() {
  24.    
  25.       //$this->_w($this->_routes, __METHOD__);
  26.      
  27.       $this->set('message', 'start setup');
  28.    }
  29.    //-----------------------------------   create tables
  30.    public function create_tables() {
  31.      
  32.       $this->set('message',$this->Setup->createTables());
  33.    }
  34.    
  35.    //-----------------------------------   finish setup
  36.    public function finish_setup() {
  37.    
  38.       $this->set('message', 'setup finished');
  39.    }
  40. }
  41.  
  42.  
  43. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement