简体   繁体   English

codeigniter可伸缩文件夹结构

[英]codeigniter scalable folder structure

I've use symfony and now using codeigniter is there any folder structure that can be used in scalable applications similar to symfony. 我使用了symfony,现在使用codeigniter可以在类似于symfony的可伸缩应用程序中使用任何文件夹结构。

I want to make an application that will be divided in sub-apps and the sub-apps will have their own modules. 我想制作一个将分为子应用程序的应用程序,并且子应用程序将具有自己的模块。

Thanks. 谢谢。

What you are describing is called HMVC (Hierarchical Model View Controller). 您所描述的称为HMVC(分层模型视图控制器)。 This means that an application is split up into modules (or as you described them, rather accurately, "sub-apps"). 这意味着将一个应用程序划分为多个模块 (或者如您所描述的,准确地说是“子应用程序”)。 Sadly CodeIgniter does not support HMVC unmodified, however there is a drop-in extension for CodeIgniter which allows you to use a HMVC architecture . 遗憾的是,CodeIgniter不支持未经修改的HMVC,但是CodeIgniter的一个插件扩展允许您使用HMVC体系结构 [Thanks Wesley] [谢谢韦斯利]

Alternatively you can use a fork of CodeIgniter which is specifically designed for HMVC called Kohana Framework . 或者,您可以使用专门为HMVC设计的CodeIgniter分支,称为Kohana Framework The project was originally a fork but has now changed massively and is barely recognisable from the original CI project. 该项目最初是一个分支,但现在发生了很大变化,并且与原始CI项目几乎无法识别。

As far as modules go, the go-to solution for CI is the HMVC package: 就模块而言,CI的首选解决方案是HMVC软件包:

https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/Home https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/首页

This is a "drop-in" solution; 这是一个“嵌入式”解决方案; very easy to install, has been around for quite a long time, and is actively maintained. 非常容易安装,已经存在了很长一段时间,并且得到了积极的维护。

Since Codeigniter tries to stay lightweight, you'll find that a lot of important things you need, like Auth or ORMs, are not built in, and you have to use third party code. 由于Codeigniter尝试保持轻量级,因此您会发现,您需要内置的许多重要内容(如Auth或ORM)并未内置,因此您必须使用第三方代码。

A lot of solutions hosted here: http://getsparks.org/packages/browse/latest 此处托管了许多解决方案: http : //getsparks.org/packages/browse/latest

And the wiki: http://codeigniter.com/wiki/ 以及Wiki: http//codeigniter.com/wiki/

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

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