views:

30

answers:

3

I am new to zend framework and having very basic doubt.I have created one application which follows its own framework. I want to integrate this application with zend framework. whenever any request comes to zend framework, I want to forward same request to my application to do some operations and then give control back to zend framework. question is, is it good to include your own created external modules directly inside index.php or bootstrapper of zend framework or create a plugin for that ?

A: 

I think its better to create a plugin. so you can access request object before zend framework process it.

Morteza M.
A: 

Zend Framework (ZF) follows the MVC pattern and therefore a certain directory structure and naming convention. When new to ZF it is not obvious from the beginning where to place the code correctly... Every framework has it's own conventions there...

Take a look at the quickstart tutorial

When you are up and running it is quite easy to run multiple PHP libraries besides ZF.

Your ZF libray structure would be something like this:

  • myproject
    • ...
    • library
    • Mylib
    • Doctrine
    • Zend
    • etc.

You would have to register the libraries and ZF autoloading is handling everything else when calling the different classes from within your project code.

udo
A: 

For best practice, I think you should use plugin.

However, there are cases when you want to bypass Zend Framework totally for performance. You could use your external module and exit before running the Controller.

Danny