Skip to end of metadata
Go to start of metadata

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_DB Component Proposal

Proposed Component Name Zend_DB
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Zend_DB
Proposers Daniel Schwiperich
Revision 1.1 - 1 August 2006: Updated from community comments. (wiki revision: 12)

Table of Contents

1. Overview

(First) Get Zend_DB.::factory with a Zend_Config object working

2. References

*

3. Component Requirements, Constraints, and Acceptance Criteria

*

4. Dependencies on Other Framework Components

  • Zend_DB
  • Zend_Config

5. Theory of Operation

Zend_DB::factory only accepts an array as param.
To get compatible to Zend_Config it has also to accept an object of type Zend_Config
I've changed therefore the factorymethod a little bit, that it'll accept a Zend_Config object
and turns the object into an array. If the object contains other types than Strings an exception will be thrown.
See the example below...

6. Milestones / Tasks

zone: Missing {zone-data:milestones}

7. Class Index

  • Zend_DB
  • Zend_Config

8. Use Cases

UC-01

An example config.xml

The DB-Init in index.php

9. Class Skeletons

The updated DB_Zend::factory method. Changes between the //----- comments

]]></ac:plain-text-body></ac:macro>

]]></ac:plain-text-body></ac:macro>

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Aug 29, 2006

    <p>I suggest revising the proposal to pose this issue for all components. The idea of using an instance of Zend_Config should be considered not just for Zend_Db, but for all components that might accept configuration in the form of key-value pairs. I also suggest renaming the proposal, perhaps to "Integrating Zend_Config".</p>

    1. Sep 23, 2006

      <p>Hi Gavin,<br />
      yeah you're right. It was just the first case I recognized, that it would be nice to get these two components compatible.<br />
      I would rename my proposal, but i'm not able to find the "edit button"!? Maybe im blind <ac:emoticon ac:name="smile" /> </p>

  2. Apr 28, 2007

    <p>It's useless. Try this as applied to your example:</p>
    <ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
    $db = Zend_Db::factory($config->database->dbtype, $config->database->asArray());
    ]]></ac:plain-text-body></ac:macro>

  3. Oct 29, 2007

    <p>Could a authorized user please remove this proposal. After a year of no further response it's is really useless in current versions.<br />
    I'm not allowed to remove my own proposal. thx</p>

  4. Oct 29, 2007

    <p>Re-parented proposal to "Removed Component Proposals"</p>