Zend Framework Admin Module structure

2019-03-06 06:37发布

问题:

I am creating a large web application with Zend Framework 1.10. A am new in Zend Framework(1 month experiance). Can you explain me how to create a admin module in the best way?(with own authentication). How to make this with good security? Thanks a lot.

回答1:

I would create AdminController in each module, then route rewriting the paths like this:

/admin/module1 => module1/AdminController
/admin/module2 => module2/AdminController

Then leverage Zend_Auth and Zend_Acl.

You will also need controller plugin which checks the credentials from Zend_Auth and a Authorization controller with login form.

But it all depends on your application.



回答2:

The good practice is to create admin module with own controllers and plugins.