fixed locator class name constructing
This commit is contained in:
parent
4e7a66744e
commit
d78f992eb6
@ -134,9 +134,15 @@ class Doctrine_Locator implements Countable, IteratorAggregate
|
|||||||
} else {
|
} else {
|
||||||
$className = $name;
|
$className = $name;
|
||||||
|
|
||||||
if ( ! class_exists($className)) {
|
if ( ! class_exists($className)) {
|
||||||
$className = $this->_classPrefix . str_replace('.', '_', $name);
|
$name = explode('.', $name);
|
||||||
|
foreach ($name as $k => $value) {
|
||||||
|
$name[$k] = ucfirst(strtolower($value));
|
||||||
|
}
|
||||||
|
$name = implode('_', $name);
|
||||||
|
|
||||||
|
$className = $this->_classPrefix . $name;
|
||||||
|
|
||||||
if ( ! class_exists($className)) {
|
if ( ! class_exists($className)) {
|
||||||
throw new Doctrine_Locator_Exception("Couldn't locate resource " . $className);
|
throw new Doctrine_Locator_Exception("Couldn't locate resource " . $className);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user