Browse Source

allow global configuration of classes.

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
c146d6c5e3
  1. 6
      framework/YiiBase.php

6
framework/YiiBase.php

@ -371,6 +371,10 @@ class YiiBase
$class = static::import($class, true); $class = static::import($class, true);
} }
if (isset(self::$objectConfig[ltrim($class, '\\')])) {
$config = array_merge(self::$objectConfig[ltrim($class, '\\')], $config);
}
if (($n = func_num_args()) > 1) { if (($n = func_num_args()) > 1) {
/** @var $reflection \ReflectionClass */ /** @var $reflection \ReflectionClass */
if (isset($reflections[$class])) { if (isset($reflections[$class])) {
@ -531,6 +535,6 @@ class YiiBase
*/ */
public static function t($message, $params = array(), $language = null) public static function t($message, $params = array(), $language = null)
{ {
return Yii::$app->getI18N()->translate($message, $params, $language); return self::$app->getI18N()->translate($message, $params, $language);
} }
} }

Loading…
Cancel
Save