use array_map instead of foreach loop
This commit is contained in:
parent
300669d13a
commit
f1162cd56d
@ -135,10 +135,10 @@ class Doctrine_Locator implements Countable, IteratorAggregate
|
|||||||
$className = $name;
|
$className = $name;
|
||||||
|
|
||||||
if ( ! class_exists($className)) {
|
if ( ! class_exists($className)) {
|
||||||
|
|
||||||
$name = explode('.', $name);
|
$name = explode('.', $name);
|
||||||
foreach ($name as $k => $value) {
|
$name = array_map('strtolower', $name);
|
||||||
$name[$k] = ucfirst(strtolower($value));
|
$name = array_map('ucfirst', $name);
|
||||||
}
|
|
||||||
$name = implode('_', $name);
|
$name = implode('_', $name);
|
||||||
|
|
||||||
$className = $this->_classPrefix . $name;
|
$className = $this->_classPrefix . $name;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user