Zend Framework

Module-Bootstraps receive application options

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8.2
  • Fix Version/s: 1.8.1
  • Component/s: Zend_Application
  • Labels:
    None

Description

Tested Version is current Trunk Revision 15543

All Modul-Boostraps receive the options set directly to the application-bootstrap.

class Test_Bootstrap extends Zend_Application_Module_Bootstrap {
    protected function _initOptionDump () {
        var_dump ($this->getOptions());
    }
}

output

array
  'bootstrap' => 
    array
      'class' => string 'Bootstrap' (length=9)
      'path' => string '/path/to/Bootstrap.php' (length=57)
  'resources' => 
    array
      'frontController' => 
        array
          'prefixDefaultModule' => string '1' (length=1)
          'throwExceptions' => string '1' (length=1)
          'moduleDirectory' => string 'modules' (length=7)
      'view' => 
        array
          'strictVars' => string '1' (length=1)
          'encoding' => string 'utf-8' (length=5)
      'layout' => 
        array
          'layoutPath' => string 'views/scripts' (length=13)
          'mvcSuccessfulActionOnly' => string '1' (length=1)
      'modules' => string '' (length=0)
      'db' => 
        array
          'adapter' => string 'pdo_sqlite' (length=10)
          'isDefaultTableAdapter' => string '1' (length=1)
          'params' => 
            array
              ...
  'test' => 
    array
      'test' => string 'test' (length=4)
  'includepaths' => 
    array
      'zend' => string '/path/to/Zend' (length=39)
  'test' => string 'test' (length=4)

With XML-Config

<config>
  <defaults>
    <bootstrap>
      <class>Bootstrap</class>
    </bootstrap>
    <resources>
      <frontController>
        <prefixDefaultModule>1</prefixDefaultModule>
        <throwExceptions>1</throwExceptions>
        <moduleDirectory>modules</moduleDirectory>
      </frontController>
      <view>
        <strictVars>1</strictVars>
        <encoding>utf-8</encoding>
      </view>
      <layout>
        <layoutPath>views/scripts</layoutPath>
        <mvcSuccessfulActionOnly>1</mvcSuccessfulActionOnly>
      </layout>
      <modules />
      <db>
        <adapter>pdo_sqlite</adapter>
        <isDefaultTableAdapter>1</isDefaultTableAdapter>
        <params>
          <dbname>main.sqlite</dbname>
        </params>
      </db>
    </resources>
    <Test>
      <test>test</test>
    </Test>
  </defaults>
As you can see the String "test" for key "test" is correctly assign, but also all others, which should not be in there.

Activity

Hide
Matthew Weier O'Phinney added a comment -

This was fixed with changes for ZF-6545.

Show
Matthew Weier O'Phinney added a comment - This was fixed with changes for ZF-6545.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: