sp框架支持hmvc嘛

#1 water6000

如题,如果支持,怎么搞?多谢!:):):)

2015-05-29 08:35:11

#2 jake

支持,请看手册 http://www.speedphp.com/thread-3829-1-1.html

2015-05-29 09:17:44

#3 water6000

希望能给了伪代码就好了!要自己琢磨需要点时间!!!:):):)

2015-05-29 10:14:29

#4 jeffrey_shou

当然可以,HMVC就是个球。

2015-06-01 21:18:55

#5 jeffrey_shou


class metas_sub extends spHController
{
       
        function metas_index($args){
               
                $conditions = "type='".$args."'";
                $lib_metas = spClass("lib_metas");
        $metas = $lib_metas->findAll($conditions);
                $oTree= new Tree(array('mid','parent','name'));
                $this->cate_tree = $oTree->getTree($metas);       
               
                $this->type=$type;
                return $this->display("cms/metas_index.html");
        }
}       

        public function index(){ // 分类列表

                $this->__PUBLIC__=__PUBLIC__;
                $args_type=$this->spArgs('type');
               
                $this->infoModule=spClass("base_common")->common_infoModule($this->controller_config[__FUNCTION__]);
               
                $this->main_render=spClass("metas_sub")->metas_index($args_type);
               
                //通用页
                $this->display("common.html");

2015-06-01 21:20:37

#6 jake

water6000 发表于 2015-5-29 10:14
希望能给了伪代码就好了!要自己琢磨需要点时间!!!
所谓的HMVC已经是开发超大型软件系统才用的其中一个架构方案,要做超大型系统架构,花点时间是必须的。


2015-06-02 08:19:58