From 2f1021830d5cd92da15cc99d25f27bcffdebf915 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Tue, 28 May 2013 18:58:35 -0400 Subject: [PATCH] Added "formatter" app component. --- framework/yii/base/Application.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/framework/yii/base/Application.php b/framework/yii/base/Application.php index eb0a0d3..d38f6a9 100644 --- a/framework/yii/base/Application.php +++ b/framework/yii/base/Application.php @@ -279,6 +279,15 @@ class Application extends Module } /** + * Returns the formatter component. + * @return \yii\base\Formatter the formatter application component. + */ + public function getFormatter() + { + return $this->getComponent('formatter'); + } + + /** * Returns the request component. * @return \yii\web\Request|\yii\console\Request the request component */ @@ -333,6 +342,9 @@ class Application extends Module 'errorHandler' => array( 'class' => 'yii\base\ErrorHandler', ), + 'formatter' => array( + 'class' => 'yii\base\Formatter', + ), 'i18n' => array( 'class' => 'yii\i18n\I18N', ),