Commit bbc3edd7 by Qiang Xue

minor doc improvement.

parent 270669aa
Helper Classes Helper Classes
============== ==============
Yii provides many helper classes to simplify commonly needed coding tasks, such as string/array manipulations, Yii provides many helper classes to help simplify some common coding tasks, such as string/array manipulations,
HTML code generation, etc. These helper classes are mostly organized under the `yii\helpers` namespace, and HTML code generation. These helper classes are organized under the `yii\helpers` namespace and
they are all static classes (meaning they contain only static properties and methods and should not be instantiated). are all static classes (meaning they contain only static properties and methods and should not be instantiated).
You use a helper class by directly calling its static method, like the following, You use a helper class by directly calling its static method, like the following,
~~~ ```php
use yii\helpers\ArrayHelper; use yii\helpers\ArrayHelper;
$c = ArrayHelper::merge($a, $b); $c = ArrayHelper::merge($a, $b);
~~~ ```
Extending Helper Classes Extending Helper Classes
------------------------ ------------------------
...@@ -36,3 +36,6 @@ Yii::$classMap['yii\helpers\ArrayHelper'] = 'path/to/ArrayHelper.php'; ...@@ -36,3 +36,6 @@ Yii::$classMap['yii\helpers\ArrayHelper'] = 'path/to/ArrayHelper.php';
The Step 4 above will instruct Yii class autoloader to load your version of the helper instead of the one The Step 4 above will instruct Yii class autoloader to load your version of the helper instead of the one
included in the Yii distribution. included in the Yii distribution.
> Tip: You can also use `Yii::$classMap` to replace ANY core Yii class, not necessarily helper classes,
> with your own customized version.
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