Browse Source

handle array in importNamespaces.

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
3123c46826
  1. 3
      framework/yii/YiiBase.php

3
framework/yii/YiiBase.php

@ -156,6 +156,9 @@ class YiiBase
foreach ($namespaces as $name => $path) { foreach ($namespaces as $name => $path) {
if ($name !== '') { if ($name !== '') {
$name = trim(strtr($name, array('\\' => '/', '_' => '/')), '/'); $name = trim(strtr($name, array('\\' => '/', '_' => '/')), '/');
if (is_array($path)) {
$path = reset($path);
}
static::setAlias('@' . $name, rtrim($path, '/\\') . '/' . $name); static::setAlias('@' . $name, rtrim($path, '/\\') . '/' . $name);
} }
} }

Loading…
Cancel
Save