ZF-4705: Zend_Db::factory() is very strict on the string format for 'adapter' and 'adapterNamespace'
Description
{{Zend_Db::factory()}} uses
$adapterName = strtolower($adapterNamespace . '_' . $adapter);
$adapterName = str_replace(' ', '_', ucwords(str_replace('_', ' ', $adapterName)));
to sanitize the strings given to the method when resolving the full class name of the adapter to load.
Well, now I'm at the point where I must use the string {{UserDb}} as the {{adapter}} and {{ISHD_Auth_Db}} as the {{adapterNamespace}} (ISHD is an acronym like IBM e.g. and should be written all-uppercase). This works quite well on Windows (development) as filenames and directory names are case-insensitive but on *nix (production server) {{Zend_Loader}} fails to load class {{Ishd_Auth_Db_Userdb}} due to its case-sensitivity.
If there is no specific reason why this strict string format {{Abc_Defg_Hijk}} must be enforced, this sanitizing should be removed.
PS: I currently do not know which other ZF components use a similar sanitizing procedure that results in the loss of freedom and flexibility with no apparent benefit.
Comments
Posted by Jordan Raub (ludicruz) on 2008-11-06T18:44:11.000+0000
without the sanitation this should be... bq. {{$adapterName = $adapterNamespace . '_' . $adapter;}}
Posted by Luiz Fernando Furtado (kgbfernando) on 2008-11-20T17:30:35.000+0000
Duplicates ZF-3154
Posted by Ralph Schindler (ralph) on 2009-09-20T14:59:36.000+0000
Fixed with solution in ZF-5606