From 6507e2e31619ab7ef2c7df508373f723e8f44cf9 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Wed, 16 Oct 2013 22:03:26 +0200 Subject: [PATCH] applied new style of Yii::t params to all occurences --- framework/yii/console/Application.php | 3 ++- framework/yii/console/Controller.php | 4 ++-- framework/yii/console/controllers/HelpController.php | 4 ++-- framework/yii/web/Controller.php | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/framework/yii/console/Application.php b/framework/yii/console/Application.php index bbdd4e1..9ca7393 100644 --- a/framework/yii/console/Application.php +++ b/framework/yii/console/Application.php @@ -9,6 +9,7 @@ namespace yii\console; +use Yii; use yii\base\InvalidRouteException; /** @@ -129,7 +130,7 @@ class Application extends \yii\base\Application try { return parent::runAction($route, $params); } catch (InvalidRouteException $e) { - throw new Exception(\Yii::t('yii', 'Unknown command "{command}".', array('{command}' => $route)), 0, $e); + throw new Exception(Yii::t('yii', 'Unknown command "{command}".', array('command' => $route)), 0, $e); } } diff --git a/framework/yii/console/Controller.php b/framework/yii/console/Controller.php index fd6d0de..73b74f8 100644 --- a/framework/yii/console/Controller.php +++ b/framework/yii/console/Controller.php @@ -99,7 +99,7 @@ class Controller extends \yii\base\Controller $args[] = $value; } else { throw new Exception(Yii::t('yii', 'Unknown option: --{name}', array( - '{name}' => $name, + 'name' => $name, ))); } } @@ -125,7 +125,7 @@ class Controller extends \yii\base\Controller if (!empty($missing)) { throw new Exception(Yii::t('yii', 'Missing required arguments: {params}', array( - '{params}' => implode(', ', $missing), + 'params' => implode(', ', $missing), ))); } diff --git a/framework/yii/console/controllers/HelpController.php b/framework/yii/console/controllers/HelpController.php index f0e72cd..678d9f9 100644 --- a/framework/yii/console/controllers/HelpController.php +++ b/framework/yii/console/controllers/HelpController.php @@ -58,7 +58,7 @@ class HelpController extends Controller $result = Yii::$app->createController($command); if ($result === false) { throw new Exception(Yii::t('yii', 'No help for unknown command "{command}".', array( - '{command}' => $this->ansiFormat($command, Console::FG_YELLOW), + 'command' => $this->ansiFormat($command, Console::FG_YELLOW), ))); } @@ -243,7 +243,7 @@ class HelpController extends Controller $action = $controller->createAction($actionID); if ($action === null) { throw new Exception(Yii::t('yii', 'No help for unknown sub-command "{command}".', array( - '{command}' => rtrim($controller->getUniqueId() . '/' . $actionID, '/'), + 'command' => rtrim($controller->getUniqueId() . '/' . $actionID, '/'), ))); } if ($action instanceof InlineAction) { diff --git a/framework/yii/web/Controller.php b/framework/yii/web/Controller.php index 6b8afa4..87edf82 100644 --- a/framework/yii/web/Controller.php +++ b/framework/yii/web/Controller.php @@ -60,7 +60,7 @@ class Controller extends \yii\base\Controller if (!empty($missing)) { throw new HttpException(400, Yii::t('yii', 'Missing required parameters: {params}', array( - '{params}' => implode(', ', $missing), + 'params' => implode(', ', $missing), ))); }