Commit 884977a7 by Qiang Xue

renamed util to helpers.

parent 339ac9b4
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
namespace yii\base; namespace yii\base;
use Yii; use Yii;
use yii\util\FileHelper; use yii\helpers\FileHelper;
/** /**
* Application is the base class for all application classes. * Application is the base class for all application classes.
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
namespace yii\base; namespace yii\base;
use Yii; use Yii;
use yii\util\FileHelper; use yii\helpers\FileHelper;
use yii\util\StringHelper; use yii\helpers\StringHelper;
/** /**
* Controller is the base class for classes containing controller logic. * Controller is the base class for classes containing controller logic.
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
namespace yii\base; namespace yii\base;
use yii\util\ArrayHelper; use yii\helpers\ArrayHelper;
/** /**
* Dictionary implements a collection that stores key-value pairs. * Dictionary implements a collection that stores key-value pairs.
......
...@@ -16,7 +16,7 @@ namespace yii\base; ...@@ -16,7 +16,7 @@ namespace yii\base;
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @since 2.0
*/ */
use yii\util\VarDumper; use yii\helpers\VarDumper;
class ErrorHandler extends Component class ErrorHandler extends Component
{ {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
namespace yii\base; namespace yii\base;
use yii\util\StringHelper; use yii\helpers\StringHelper;
use yii\validators\Validator; use yii\validators\Validator;
use yii\validators\RequiredValidator; use yii\validators\RequiredValidator;
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
namespace yii\base; namespace yii\base;
use Yii; use Yii;
use yii\util\StringHelper; use yii\helpers\StringHelper;
use yii\util\FileHelper; use yii\helpers\FileHelper;
/** /**
* Module is the base class for module and application classes. * Module is the base class for module and application classes.
......
...@@ -9,7 +9,7 @@ namespace yii\base; ...@@ -9,7 +9,7 @@ namespace yii\base;
use Yii; use Yii;
use yii\base\InvalidConfigException; use yii\base\InvalidConfigException;
use yii\util\FileHelper; use yii\helpers\FileHelper;
/** /**
* Theme represents an application theme. * Theme represents an application theme.
......
...@@ -9,7 +9,7 @@ namespace yii\base; ...@@ -9,7 +9,7 @@ namespace yii\base;
use Yii; use Yii;
use yii\base\Application; use yii\base\Application;
use yii\util\FileHelper; use yii\helpers\FileHelper;
/** /**
* View represents a view object in the MVC pattern. * View represents a view object in the MVC pattern.
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
namespace yii\base; namespace yii\base;
use Yii; use Yii;
use yii\util\FileHelper; use yii\helpers\FileHelper;
/** /**
* Widget is the base class for widgets. * Widget is the base class for widgets.
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
namespace yii\console\controllers; namespace yii\console\controllers;
use yii\console\Controller; use yii\console\Controller;
use yii\util\FileHelper; use yii\helpers\FileHelper;
use yii\base\Exception; use yii\base\Exception;
/** /**
......
...@@ -13,7 +13,7 @@ use yii\console\Exception; ...@@ -13,7 +13,7 @@ use yii\console\Exception;
use yii\base\InlineAction; use yii\base\InlineAction;
use yii\console\Controller; use yii\console\Controller;
use yii\console\Request; use yii\console\Request;
use yii\util\StringHelper; use yii\helpers\StringHelper;
/** /**
* This command provides help information about console commands. * This command provides help information about console commands.
......
...@@ -13,7 +13,7 @@ use yii\console\Exception; ...@@ -13,7 +13,7 @@ use yii\console\Exception;
use yii\console\Controller; use yii\console\Controller;
use yii\db\Connection; use yii\db\Connection;
use yii\db\Query; use yii\db\Query;
use yii\util\ArrayHelper; use yii\helpers\ArrayHelper;
/** /**
* This command manages application migrations. * This command manages application migrations.
......
...@@ -16,7 +16,7 @@ use yii\base\InvalidCallException; ...@@ -16,7 +16,7 @@ use yii\base\InvalidCallException;
use yii\db\Connection; use yii\db\Connection;
use yii\db\TableSchema; use yii\db\TableSchema;
use yii\db\Expression; use yii\db\Expression;
use yii\util\StringHelper; use yii\helpers\StringHelper;
/** /**
* ActiveRecord is the base class for classes representing relational data in terms of objects. * ActiveRecord is the base class for classes representing relational data in terms of objects.
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* @license http://www.yiiframework.com/license/ * @license http://www.yiiframework.com/license/
*/ */
namespace yii\util; namespace yii\helpers;
use Yii; use Yii;
use yii\base\InvalidParamException; use yii\base\InvalidParamException;
...@@ -59,11 +59,11 @@ class ArrayHelper ...@@ -59,11 +59,11 @@ class ArrayHelper
* *
* ~~~ * ~~~
* // working with array * // working with array
* $username = \yii\util\ArrayHelper::getValue($_POST, 'username'); * $username = \yii\helpers\ArrayHelper::getValue($_POST, 'username');
* // working with object * // working with object
* $username = \yii\util\ArrayHelper::getValue($user, 'username'); * $username = \yii\helpers\ArrayHelper::getValue($user, 'username');
* // working with anonymous function * // working with anonymous function
* $fullName = \yii\util\ArrayHelper::getValue($user, function($user, $defaultValue) { * $fullName = \yii\helpers\ArrayHelper::getValue($user, function($user, $defaultValue) {
* return $user->firstName . ' ' . $user->lastName; * return $user->firstName . ' ' . $user->lastName;
* }); * });
* ~~~ * ~~~
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* @license http://www.yiiframework.com/license/ * @license http://www.yiiframework.com/license/
*/ */
namespace yii\util; namespace yii\helpers;
// todo define how subclassing will work // todo define how subclassing will work
// todo add a run() or render() method // todo add a run() or render() method
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* @license http://www.yiiframework.com/license/ * @license http://www.yiiframework.com/license/
*/ */
namespace yii\util; namespace yii\helpers;
use yii\base\Exception; use yii\base\Exception;
use yii\base\InvalidConfigException; use yii\base\InvalidConfigException;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* @license http://www.yiiframework.com/license/ * @license http://www.yiiframework.com/license/
*/ */
namespace yii\util; namespace yii\helpers;
use Yii; use Yii;
use yii\base\InvalidParamException; use yii\base\InvalidParamException;
...@@ -655,7 +655,7 @@ class Html ...@@ -655,7 +655,7 @@ class Html
* are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too). * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too).
* For each sub-array, an option group will be generated whose label is the key associated with the sub-array. * For each sub-array, an option group will be generated whose label is the key associated with the sub-array.
* If you have a list of data models, you may convert them into the format described above using * If you have a list of data models, you may convert them into the format described above using
* [[\yii\util\ArrayHelper::map()]]. * [[\yii\helpers\ArrayHelper::map()]].
* *
* Note, the values and labels will be automatically HTML-encoded by this method, and the blank spaces in * Note, the values and labels will be automatically HTML-encoded by this method, and the blank spaces in
* the labels will also be HTML-encoded. * the labels will also be HTML-encoded.
...@@ -695,7 +695,7 @@ class Html ...@@ -695,7 +695,7 @@ class Html
* are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too). * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too).
* For each sub-array, an option group will be generated whose label is the key associated with the sub-array. * For each sub-array, an option group will be generated whose label is the key associated with the sub-array.
* If you have a list of data models, you may convert them into the format described above using * If you have a list of data models, you may convert them into the format described above using
* [[\yii\util\ArrayHelper::map()]]. * [[\yii\helpers\ArrayHelper::map()]].
* *
* Note, the values and labels will be automatically HTML-encoded by this method, and the blank spaces in * Note, the values and labels will be automatically HTML-encoded by this method, and the blank spaces in
* the labels will also be HTML-encoded. * the labels will also be HTML-encoded.
...@@ -866,7 +866,7 @@ class Html ...@@ -866,7 +866,7 @@ class Html
* are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too). * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too).
* For each sub-array, an option group will be generated whose label is the key associated with the sub-array. * For each sub-array, an option group will be generated whose label is the key associated with the sub-array.
* If you have a list of data models, you may convert them into the format described above using * If you have a list of data models, you may convert them into the format described above using
* [[\yii\util\ArrayHelper::map()]]. * [[\yii\helpers\ArrayHelper::map()]].
* *
* Note, the values and labels will be automatically HTML-encoded by this method, and the blank spaces in * Note, the values and labels will be automatically HTML-encoded by this method, and the blank spaces in
* the labels will also be HTML-encoded. * the labels will also be HTML-encoded.
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* @license http://www.yiiframework.com/license/ * @license http://www.yiiframework.com/license/
*/ */
namespace yii\util; namespace yii\helpers;
use Yii; use Yii;
use yii\base\Exception; use yii\base\Exception;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* @license http://www.yiiframework.com/license/ * @license http://www.yiiframework.com/license/
*/ */
namespace yii\util; namespace yii\helpers;
/** /**
* StringHelper * StringHelper
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* @license http://www.yiiframework.com/license/ * @license http://www.yiiframework.com/license/
*/ */
namespace yii\util; namespace yii\helpers;
/** /**
* VarDumper is intended to replace the buggy PHP function var_dump and print_r. * VarDumper is intended to replace the buggy PHP function var_dump and print_r.
......
...@@ -9,7 +9,7 @@ namespace yii\web; ...@@ -9,7 +9,7 @@ namespace yii\web;
use Yii; use Yii;
use yii\base\DictionaryIterator; use yii\base\DictionaryIterator;
use yii\util\SecurityHelper; use yii\helpers\SecurityHelper;
/** /**
* CookieCollection maintains the cookies available in the current request. * CookieCollection maintains the cookies available in the current request.
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
namespace yii\web; namespace yii\web;
use yii\util\FileHelper; use yii\helpers\FileHelper;
/** /**
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
namespace yii\web; namespace yii\web;
use Yii; use Yii;
use yii\util\Html; use yii\helpers\Html;
/** /**
* Sort represents information relevant to sorting. * Sort represents information relevant to sorting.
......
...@@ -11,8 +11,8 @@ use Yii; ...@@ -11,8 +11,8 @@ use Yii;
use yii\base\InvalidParamException; use yii\base\InvalidParamException;
use yii\base\Widget; use yii\base\Widget;
use yii\base\Model; use yii\base\Model;
use yii\util\Html; use yii\helpers\Html;
use yii\util\ArrayHelper; use yii\helpers\ArrayHelper;
/** /**
* ActiveForm ... * ActiveForm ...
...@@ -23,7 +23,7 @@ use yii\util\ArrayHelper; ...@@ -23,7 +23,7 @@ use yii\util\ArrayHelper;
class ActiveForm extends Widget class ActiveForm extends Widget
{ {
/** /**
* @param array|string $action the form action URL. This parameter will be processed by [[\yii\util\Html::url()]]. * @param array|string $action the form action URL. This parameter will be processed by [[\yii\helpers\Html::url()]].
*/ */
public $action = ''; public $action = '';
/** /**
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
namespace yiiunit\framework\util; namespace yiiunit\framework\util;
use yii\util\ArrayHelper; use yii\helpers\ArrayHelper;
class ArrayHelperTest extends \yii\test\TestCase class ArrayHelperTest extends \yii\test\TestCase
{ {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace yiiunit\framework\util; namespace yiiunit\framework\util;
use Yii; use Yii;
use yii\util\Html; use yii\helpers\Html;
use yii\web\Application; use yii\web\Application;
class HtmlTest extends \yii\test\TestCase class HtmlTest extends \yii\test\TestCase
......
<?php <?php
use yii\util\Html; use yii\helpers\Html;
class DefaultController extends \yii\web\Controller class DefaultController extends \yii\web\Controller
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment