Welcome Guest, Not a member yet? Register   Sign In
localizing an app
#1

I am looking for a php framework that allows me to have a 'core' section with the main implementation and mouldes and a 'custom' section that allows me to have overridden methods of core and customized html 

for example in core i will have

Controller.php with actions create,delete
View.php with html/php 

and in the 'custom' will have
Controller.php with action create only
and
View.php with html/php

The framework then 'scans' both core and custom for files in the same path structure and in the example above the Controller.php executed will have delete from core and create from custom while view.php will be from custom.

Does CI allow that ?
Reply
#2

Not necessarily a framework thing, if I understand you correctly you're talking about creating base functions in a class, then extending that class with extra functionality? If that's the case, it's a basic php feature that's available on all frameworks. In Codeigniter you can extend the basic CI_Controller and add functionality there.
Codeigniter is simply one of the tools you need to learn to be a successful developer. Always add more tools to your coding arsenal!
Reply
#3

CI does not really disallow anything. So in answer, Yes. The beauty of PHP and CI is that neither the language nor the framework tell you how you have to do things. But the framework is an MVC framework, but what you have described is somewhat confusing and sounds very much like a big fat controller. I would revisit your requirements or your plan, or you are going to find it will become an enormous PITA for maintenance and development.

CI offers libraries, models, helpers, controllers, views and hooks that can operate pre system, pre controller, post controller (and many more positions) which means your code can be DRY, portable, partitioned, testable and easily extensible as well as database independent.

Give CI a go, you will not be disappointed.

Paul.
Reply
#4

I think i should make a more complicated example

core/ControllerA.php @ create , edit , delete , update , list , view
core/ControllerB.php @ create , edit , delete , update , list , view
core/ViewA.php @ not sure if CI uses functions or classes for render , please advice
core/ViewB.php

The above is going to be the core product and below will be the "customized" overrides for each customer which can be none or all

Customer A
custom/ControllerA.php @ create , edit
custom/ViewA.php , a customized view for customer

Customer B
[no files]

Customer C [all core/ files and methods are overriden]
custom/ControllerA.php @ create , edit , delete , update , list , view
custom/ControllerB.php @ create , edit , delete , update , list , view
custom/ViewA.php @ not sure if CI uses functions or classes for render , please advice
custom/ViewB.php

All the files in custom/* above inherit from files in core/ [please clarify for the views if can inherit]

What is executed for each customer
----------------------------------

Customer A
custom/ControllerA.php @ create , edit
core/ControllerA.php @ delete , update , list , view
core/ControllerB.php @ create , edit , delete , update , list , view
custom/ViewA.php , a customized view for customer
core/ViewB.php

Customer B
executes whatever is in core/*

Customer C
executes whatever is in custom/*


For the above scenarios i assume as well , models , property fails, configuration etc.
Would be be possible to have PHPUnit on this as well ?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB