« Return to Thread: Using session_namespace or registry to store information between modules

Using session_namespace or registry to store information between modules

by Filipe Carvalho :: Rate this Message:

Reply to Author | View in Thread


    Hi,

    I'm developing an application and I decide to split the application in several modules to be easier to maintain. Using MVC model, in bootstrap I've:

$front = Zend_Controller_Front::getInstance();
$front->addControllerDirectory('../application/module_default/controllers','default');
$front->addControllerDirectory('../application/module_foruns/controllers','foruns');
$front->addControllerDirectory('../application/module_noticias/controllers','
noticias');
(note: in the end of email, is the full directory tree I'm using)

    Where default module maintain the main functionalities and foruns and noticias are satellite modules that also use main controllers in default module.

    In a concrete example, in noticias module I want to be able to get data from model and display it. But I've a controller in default module, that will export that data for a file.

    I've tried to create zend_session_namespace and zend_registry (in satellite modules) to transmit information to controller in default modules and didn't have success.

    I've been able to create a
zend_session_namespace in bootstrap and get values in noticias module.

    It is some feature that do not allow pass data from one module to another, to modules be secure?

    There is anyway to send information between satellite modules and default modules?

    Thanks in advande.

    Best Regards,

    Filipe Carvalho

   


.
|-- configurations
|   |-- config.php
|   `-- database.xml
|-- languages
|   `-- portuguese.php
|-- layouts
|   |-- default.phtml
|   |-- footer.phtml
|   `-- header.phtml
|-- module_default
|   |-- ReportDefinition
|   |   `-- noticias.xml
|   |-- controllers
|   |   |-- ErrorController.php
|   |   |-- ExportController.php
|   |   |-- IndexController.php
|   |   |-- LoginController.php
|   |   |-- NoauthController.php
|   |   |-- ScratchpadController.php
|   |   `-- UtilizadoresController.php
|   |-- helpers
|   |   `-- TableViewHelper.php
|   |-- models
|   |   |-- Datatypes.php
|   |   |-- UA.php
|   |   `-- Users.php
|   `-- views
|       `-- scripts
|           |-- TableView.phtml
|           |-- TableViewFunction.php
|           |-- error
|           |   |-- error.phtml
|           |   `-- privileges.phtml
|           |-- index
|           |   `-- index.phtml
|           |-- login
|           |   `-- index.phtml
|           |-- noauth
|           |   `-- index.phtml
|           |-- scratchpad
|           |   `-- index.phtml
|           `-- utilizadores
|               `-- index.phtml
|-- module_foruns
|   |-- controllers
|   |   `-- IndexController.php
|   |-- models
|   `-- views
|       `-- scripts
|           `-- index
|               `-- index.phtml
`-- module_noticias
    |-- controllers
    |   `-- IndexController.php
    |-- models
    |   `-- Noticias.php
    `-- views
        `-- scripts
            `-- index


   


smime.p7s (4K) Download Attachment

 « Return to Thread: Using session_namespace or registry to store information between modules

LightInTheBox - Buy quality products at wholesale price