1

i am currently working on a project with zend 2 framework and i am trying to find out if its possible to controll whether a module is activ or not by the database.

I am trying to create an admin panel for my project and there i want to active and deactivate modules.

One thought was to load the config from the database in the "index.php" file before this line of code :

// Run the application!
Zend\Mvc\Application::init(require 'config/basic.config.php')->run();

So instead of using the config from basic.config.php i will load the data from the database and create an array just like the one in the basic.config.php file.

Would this be the right way to achieve this ?

Is it also possible to load a module config from database ? So i can change the route for a module from the admin panel.

Cheers !

1 Answer 1

1

My suggestion is to write information from admin panel in configuration files by Writer. If you use PhpArray then read configuration without parsing and reading from files is faster than the database.

Sign up to request clarification or add additional context in comments.

1 Comment

Looks great, i will try this one out !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.