Commit 4a3c8338 by aminking2005

Update structure-extensions.md

parent 285055c4
...@@ -243,7 +243,7 @@ To avoid name collisions and make the classes in your extension autoloadable, yo ...@@ -243,7 +243,7 @@ To avoid name collisions and make the classes in your extension autoloadable, yo
name the classes in your extension by following the [PSR-4 standard](http://www.php-fig.org/psr/psr-4/) or name the classes in your extension by following the [PSR-4 standard](http://www.php-fig.org/psr/psr-4/) or
[PSR-0 standard](http://www.php-fig.org/psr/psr-0/). [PSR-0 standard](http://www.php-fig.org/psr/psr-0/).
You class namespaces should start with `vendorName\extensionName`, where `extensionName` is similar to the project name Your class namespaces should start with `vendorName\extensionName`, where `extensionName` is similar to the project name
in the package name except that it should not contain the `yii2-` prefix. For example, for the `yiisoft/yii2-imagine` in the package name except that it should not contain the `yii2-` prefix. For example, for the `yiisoft/yii2-imagine`
extension, we use `yii\imagine` as the namespace its classes. extension, we use `yii\imagine` as the namespace its classes.
......
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