I'm going to do my best to explain this.

So, we have the ability to create independent bootstraps for each module, as
well as having a parent bootstrap within the application directory.

I'm having an issue accessing resources from the parent within the module
based bootstraps.

For example, I have a resource 'db' defined within the parent. However, none
of the module bootstraps can see it. The DB connections are the same: I
don't want to have to repeat the db connections several times (that's the
point of inheritance, no?).

In my application.xml I have the following lines:

        <resources> <!-- Base? Parent? -->

            <db adapter="pdo_mysql">

                <params host="unknown.prodserver" username="prod"
password="prod"

                    dbname="prod" port="0000" />

            </db>
            <modules><placeholder /></modules>
            .....

        </resources>

        <admin> <!-- Inherits from base? right? -->

            <resources>

                ....

            </resources>
        </admin>

Within my Admin_Bootstrap, I have the following two lines:
        $this->bootstrap( 'db' );
        $db = $this->getResource('db');

The error I'm getting is:  'Resource matching "db" not found'
What I expected was to get the base global resource, 'db' from the parent.

Is there a way to allow Admin_Bootstrap to see the parent db resource,
without having to repeat the db connection several times?

---
Philip
[email protected]
http://www.gpcentre.net/

Reply via email to