zend framework - How do I determine routing information when loading frontcontroller plugins? -


I recently added an admin module in my application. This application is different from the main site (different applications Administrator tools can be used on individual sites and admin users are stored in a separate table), and this is causing problems due to the singleton nature of Zend_Auth, I have an important time at my Zend_Auth example. Have been overwritten, and I am blowing my application. So ...

I want to try to determine which modules are being requested in bootstrap and only the proper Front Controller plugin can be loaded. At this point of execution, there is a way to determine which module is being requested, or is there a better solution? how? Below is the method in Bootstrap to initialize the controller plugins.

Protected Function _Infront Controller Plug-in Setup () {$ this-> Bootstrap (array ('Front Controller', 'Resource Loader', 'Session',));

// Get site security $ session INFO = $ this- & gt; GetOption ("resource"); If ($ namespace = $ sessionInfo ['session'] ['name']) {$ data = array ("cookename" = & gt; $ name space); } And (throwing new exceptions ("Athlugin session namespace can not be found");} $ FrontController = $ this-> GetResource ("Front Controller"); // Register Plugins $ frontController-> RegisterPlugin (new GS_Admin_Plin_Auth_Admin ($ Data); $ FrontController-> Registerplugin (new GS_Model_Plugin_Auth_User ($ data))}}

It does not directly answer your question, but in a way I have handled it, in the past many entry points for the application That is, 2 or more index.php files can be set in each separate index.php, which is defined as where the program is entering from. Depending on it, you have different controller plug-ins

An example may be set for your public folder:

  /index.php /admin/index.php  

Both of these will still call the same bootstrap class.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -