Browse Source

renamed util to helpers.

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
884977a724
  1. 2
      framework/base/Application.php
  2. 4
      framework/base/Controller.php
  3. 2
      framework/base/Dictionary.php
  4. 2
      framework/base/ErrorHandler.php
  5. 2
      framework/base/Model.php
  6. 4
      framework/base/Module.php
  7. 2
      framework/base/Theme.php
  8. 2
      framework/base/View.php
  9. 2
      framework/base/Widget.php
  10. 2
      framework/console/controllers/AppController.php
  11. 2
      framework/console/controllers/HelpController.php
  12. 2
      framework/console/controllers/MigrateController.php
  13. 2
      framework/db/ActiveRecord.php
  14. 8
      framework/helpers/ArrayHelper.php
  15. 2
      framework/helpers/ConsoleColor.php
  16. 2
      framework/helpers/FileHelper.php
  17. 8
      framework/helpers/Html.php
  18. 2
      framework/helpers/SecurityHelper.php
  19. 2
      framework/helpers/StringHelper.php
  20. 2
      framework/helpers/VarDumper.php
  21. 2
      framework/web/CookieCollection.php
  22. 2
      framework/web/Response.php
  23. 2
      framework/web/Sort.php
  24. 6
      framework/widgets/ActiveForm.php
  25. 2
      tests/unit/framework/util/ArrayHelperTest.php
  26. 2
      tests/unit/framework/util/HtmlTest.php
  27. 2
      tests/web/app/protected/controllers/SiteController.php

2
framework/base/Application.php

@ -8,7 +8,7 @@
namespace yii\base;
use Yii;
use yii\util\FileHelper;
use yii\helpers\FileHelper;
/**
* Application is the base class for all application classes.

4
framework/base/Controller.php

@ -8,8 +8,8 @@
namespace yii\base;
use Yii;
use yii\util\FileHelper;
use yii\util\StringHelper;
use yii\helpers\FileHelper;
use yii\helpers\StringHelper;
/**
* Controller is the base class for classes containing controller logic.

2
framework/base/Dictionary.php

@ -7,7 +7,7 @@
namespace yii\base;
use yii\util\ArrayHelper;
use yii\helpers\ArrayHelper;
/**
* Dictionary implements a collection that stores key-value pairs.

2
framework/base/ErrorHandler.php

@ -16,7 +16,7 @@ namespace yii\base;
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
use yii\util\VarDumper;
use yii\helpers\VarDumper;
class ErrorHandler extends Component
{

2
framework/base/Model.php

@ -7,7 +7,7 @@
namespace yii\base;
use yii\util\StringHelper;
use yii\helpers\StringHelper;
use yii\validators\Validator;
use yii\validators\RequiredValidator;

4
framework/base/Module.php

@ -8,8 +8,8 @@
namespace yii\base;
use Yii;
use yii\util\StringHelper;
use yii\util\FileHelper;
use yii\helpers\StringHelper;
use yii\helpers\FileHelper;
/**
* Module is the base class for module and application classes.

2
framework/base/Theme.php

@ -9,7 +9,7 @@ namespace yii\base;
use Yii;
use yii\base\InvalidConfigException;
use yii\util\FileHelper;
use yii\helpers\FileHelper;
/**
* Theme represents an application theme.

2
framework/base/View.php

@ -9,7 +9,7 @@ namespace yii\base;
use Yii;
use yii\base\Application;
use yii\util\FileHelper;
use yii\helpers\FileHelper;
/**
* View represents a view object in the MVC pattern.

2
framework/base/Widget.php

@ -8,7 +8,7 @@
namespace yii\base;
use Yii;
use yii\util\FileHelper;
use yii\helpers\FileHelper;
/**
* Widget is the base class for widgets.

2
framework/console/controllers/AppController.php

@ -8,7 +8,7 @@
namespace yii\console\controllers;
use yii\console\Controller;
use yii\util\FileHelper;
use yii\helpers\FileHelper;
use yii\base\Exception;
/**

2
framework/console/controllers/HelpController.php

@ -13,7 +13,7 @@ use yii\console\Exception;
use yii\base\InlineAction;
use yii\console\Controller;
use yii\console\Request;
use yii\util\StringHelper;
use yii\helpers\StringHelper;
/**
* This command provides help information about console commands.

2
framework/console/controllers/MigrateController.php

@ -13,7 +13,7 @@ use yii\console\Exception;
use yii\console\Controller;
use yii\db\Connection;
use yii\db\Query;
use yii\util\ArrayHelper;
use yii\helpers\ArrayHelper;
/**
* This command manages application migrations.

2
framework/db/ActiveRecord.php

@ -16,7 +16,7 @@ use yii\base\InvalidCallException;
use yii\db\Connection;
use yii\db\TableSchema;
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.

8
framework/helpers/ArrayHelper.php

@ -5,7 +5,7 @@
* @license http://www.yiiframework.com/license/
*/
namespace yii\util;
namespace yii\helpers;
use Yii;
use yii\base\InvalidParamException;
@ -59,11 +59,11 @@ class ArrayHelper
*
* ~~~
* // working with array
* $username = \yii\util\ArrayHelper::getValue($_POST, 'username');
* $username = \yii\helpers\ArrayHelper::getValue($_POST, 'username');
* // working with object
* $username = \yii\util\ArrayHelper::getValue($user, 'username');
* $username = \yii\helpers\ArrayHelper::getValue($user, 'username');
* // 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;
* });
* ~~~

2
framework/helpers/ConsoleColor.php

@ -5,7 +5,7 @@
* @license http://www.yiiframework.com/license/
*/
namespace yii\util;
namespace yii\helpers;
// todo define how subclassing will work
// todo add a run() or render() method

2
framework/helpers/FileHelper.php

@ -7,7 +7,7 @@
* @license http://www.yiiframework.com/license/
*/
namespace yii\util;
namespace yii\helpers;
use yii\base\Exception;
use yii\base\InvalidConfigException;

8
framework/helpers/Html.php

@ -5,7 +5,7 @@
* @license http://www.yiiframework.com/license/
*/
namespace yii\util;
namespace yii\helpers;
use Yii;
use yii\base\InvalidParamException;
@ -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).
* 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
* [[\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
* the labels will also be HTML-encoded.
@ -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).
* 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
* [[\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
* the labels will also be HTML-encoded.
@ -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).
* 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
* [[\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
* the labels will also be HTML-encoded.

2
framework/helpers/SecurityHelper.php

@ -5,7 +5,7 @@
* @license http://www.yiiframework.com/license/
*/
namespace yii\util;
namespace yii\helpers;
use Yii;
use yii\base\Exception;

2
framework/helpers/StringHelper.php

@ -5,7 +5,7 @@
* @license http://www.yiiframework.com/license/
*/
namespace yii\util;
namespace yii\helpers;
/**
* StringHelper

2
framework/helpers/VarDumper.php

@ -6,7 +6,7 @@
* @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.

2
framework/web/CookieCollection.php

@ -9,7 +9,7 @@ namespace yii\web;
use Yii;
use yii\base\DictionaryIterator;
use yii\util\SecurityHelper;
use yii\helpers\SecurityHelper;
/**
* CookieCollection maintains the cookies available in the current request.

2
framework/web/Response.php

@ -7,7 +7,7 @@
namespace yii\web;
use yii\util\FileHelper;
use yii\helpers\FileHelper;
/**
* @author Qiang Xue <qiang.xue@gmail.com>

2
framework/web/Sort.php

@ -8,7 +8,7 @@
namespace yii\web;
use Yii;
use yii\util\Html;
use yii\helpers\Html;
/**
* Sort represents information relevant to sorting.

6
framework/widgets/ActiveForm.php

@ -11,8 +11,8 @@ use Yii;
use yii\base\InvalidParamException;
use yii\base\Widget;
use yii\base\Model;
use yii\util\Html;
use yii\util\ArrayHelper;
use yii\helpers\Html;
use yii\helpers\ArrayHelper;
/**
* ActiveForm ...
@ -23,7 +23,7 @@ use yii\util\ArrayHelper;
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 = '';
/**

2
tests/unit/framework/util/ArrayHelperTest.php

@ -2,7 +2,7 @@
namespace yiiunit\framework\util;
use yii\util\ArrayHelper;
use yii\helpers\ArrayHelper;
class ArrayHelperTest extends \yii\test\TestCase
{

2
tests/unit/framework/util/HtmlTest.php

@ -3,7 +3,7 @@
namespace yiiunit\framework\util;
use Yii;
use yii\util\Html;
use yii\helpers\Html;
use yii\web\Application;
class HtmlTest extends \yii\test\TestCase

2
tests/web/app/protected/controllers/SiteController.php

@ -1,6 +1,6 @@
<?php
use yii\util\Html;
use yii\helpers\Html;
class DefaultController extends \yii\web\Controller
{

Loading…
Cancel
Save