CodeIgniter: the best way to implement external objects (objects that are not models, views, or controllers)?

I want to add some classes to the CodeIgniter project that are not models, views, or controllers. Most likely, they will be built in models / controllers and will be used in various ways. Where should I store these classes and what is the best way to implement them in CodeIgniter? (Or, more generally, on any MVC basis?).

EDIT: Looking through some of the codeIgniter documentation, it seems like adding objects to the helper is the way to go, right?

+3
source share
3 answers

CI MVC , . , :

  • ()/require() . , . CI , . , . "libs", , , CI.

  • / CI- > load(). , - . CI .

. CI.

+9

, , objects_helper.php, , , , Library, .

factory, - :

$this->factory->createUserObject( $name, $rank, $serial );

, hooks, , .



require/include, , ( / ) . , , .

+2
+1

Source: https://habr.com/ru/post/1735613/


All Articles