简体   繁体   English

Codeigniter HMVC模块结构

[英]Codeigniter HMVC modules structure

I'm working on a content management system in Codeigniter with the Datamapper and HMVC extension. 我正在使用Datamapper和HMVC扩展的Codeigniter中的内容管理系统。 My question is, how to handle submodules. 我的问题是,如何处理子模块。

Example: I want to create an User module which exists from Users, Usergroups, Rights and Modules. 示例:我想创建一个用户模块,该模块存在于用户,用户组,权限和模块中。 In codeigniter I have build it now like this: 在codeigniter中,我现在这样构建它:

Codeigniter root
    application
      modules
        Users
          models 
            user
            right
            usergroup
            module

Is this the right way to fix it or am I doing it wrong? 这是修复它的正确方法还是我做错了?

You can't have submodules in HMVC without extending the MY_router class. 如果不扩展MY_router类,则HMVC中将没有子模块。

You have a nice tutorial here: HMVC: an Introduction and Application 您在这里有一个不错的教程: HMVC:简介和应用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM