示例#1
0
 public function init($name, $fields = array())
 {
     parent::init();
     $this->_name = $name;
     $names = explode('-', $name);
     foreach ($names as &$row) {
         $row = ucfirst($row);
     }
     $name = implode('', $names);
     $this->_name_upper = implode('-', $names);
     $this->_model = 'Application_Model_' . $name;
     $this->_mapper = 'Application_Model_' . $name . 'Mapper';
     $this->_find_form = 'Application_Form_' . $name . 'Find';
     $this->_create_form = 'Application_Form_' . $name . 'Create';
     $this->_edit_form = 'Application_Form_' . $name . 'Edit';
     //      $this->_delete_form = 'Application_Form_' . $name . 'Delete';
     $this->_delete_form = 'Application_Form_Delete';
     $model = new $this->_model();
     $this->_fields = count($fields) ? $fields : $model->getFields();
 }
示例#2
0
文件: Controller.php 项目: nllx/mvc
 public function __construct()
 {
     self::$render = new View();
 }