Browse Source

DI WIP

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
eba2c032a8
  1. 5
      Mailer.php

5
Mailer.php

@ -200,10 +200,9 @@ class Mailer extends BaseMailer
} }
} }
unset($config['constructArgs']); unset($config['constructArgs']);
array_unshift($args, $className); $object = Yii::createObject($className, $args);
$object = call_user_func_array(['Yii', 'createObject'], $args);
} else { } else {
$object = new $className; $object = Yii::createObject($className);
} }
if (!empty($config)) { if (!empty($config)) {
foreach ($config as $name => $value) { foreach ($config as $name => $value) {

Loading…
Cancel
Save