ZF-10986: Namespace problem with custom adapters

Issue Type: Bug Created: 2011-01-23T05:35:14.000+0000 Last Updated: 2011-01-24T01:32:52.000+0000 Status: Open Fix version(s): Reporter: Rainer Collet (rainco) Assignee: Ralph Schindler (ralph) Tags: - Zend_Db

Related issues: - ZF-5606



It is not possible to create custom Zend_Db adapters within a custom namespace and create an instance through Zend_Db::factory. Using namespace "My\Zend\Db\Adapter" and adapter name "Pdo\Pgsql Zend_Db::factory tries to create an instance of "My\Zend\Db\Adapter_Pdo\Pgsql" intead of "My\Zend\Db\Adapter\Pdo\Pgsql". This is due to the following code in Zend_Db::factory:

    // Adapter no longer normalized- see <a rel="nofollow" href=""></a>
    $adapterName = $adapterNamespace . '_';
    $adapterName .= str_replace(' ', '_', ucwords(str_replace('_', ' ', strtolower($adapter))));

This is valid for 1.11.2 and current trunk as well.


No comments to display

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.