From f1162cd56dee41c8160cf83c7e0be314a4bd1ca7 Mon Sep 17 00:00:00 2001 From: jepso Date: Mon, 8 Oct 2007 16:12:02 +0000 Subject: [PATCH] use array_map instead of foreach loop --- lib/Doctrine/Locator.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/Locator.php b/lib/Doctrine/Locator.php index ed7714079..cb95e656b 100644 --- a/lib/Doctrine/Locator.php +++ b/lib/Doctrine/Locator.php @@ -135,10 +135,10 @@ class Doctrine_Locator implements Countable, IteratorAggregate $className = $name; if ( ! class_exists($className)) { + $name = explode('.', $name); - foreach ($name as $k => $value) { - $name[$k] = ucfirst(strtolower($value)); - } + $name = array_map('strtolower', $name); + $name = array_map('ucfirst', $name); $name = implode('_', $name); $className = $this->_classPrefix . $name;