Commit da9d544c by Qiang Xue

psr-4 change.

parent d9802aac
......@@ -97,24 +97,24 @@
},
"autoload": {
"psr-4": {
"yii\\apidoc\\": "extensions/apidoc/",
"yii\\authclient\\": "extensions/authclient/",
"yii\\bootstrap\\": "extensions/bootstrap/",
"yii\\codeception\\": "extensions/codeception/",
"yii\\debug\\": "extensions/debug/",
"yii\\elasticsearch\\": "extensions/elasticsearch/",
"yii\\faker\\": "extensions/faker/",
"yii\\gii\\": "extensions/gii/",
"yii\\imagine\\" : "extensions/imagine/",
"yii\\jui\\": "extensions/jui/",
"yii\\mongodb\\": "extensions/mongodb/",
"yii\\redis\\": "extensions/redis/",
"yii\\smarty\\": "extensions/smarty/",
"yii\\swiftmailer\\": "extensions/swiftmailer/",
"yii\\sphinx\\": "extensions/sphinx/",
"yii\\twig\\": "extensions/twig/"
},
"psr-0": {
"yii\\apidoc\\": "extensions/",
"yii\\authclient\\": "extensions/",
"yii\\bootstrap\\": "extensions/",
"yii\\codeception\\": "extensions/",
"yii\\debug\\": "extensions/",
"yii\\elasticsearch\\": "extensions/",
"yii\\gii\\": "extensions/",
"yii\\imagine\\" : "extensions/",
"yii\\jui\\": "extensions/",
"yii\\mongodb\\": "extensions/",
"yii\\redis\\": "extensions/",
"yii\\smarty\\": "extensions/",
"yii\\swiftmailer\\": "extensions/",
"yii\\sphinx\\": "extensions/",
"yii\\": "framework/"
}
}
......
......@@ -81,7 +81,7 @@ Autoloading
All classes, interfaces and traits are loaded automatically at the moment they are used. There's no need to use
`include` or `require`. It is, as well, true for Composer-loaded packages and Yii extensions.
Autoloader works according to [PSR-0](). That means namespaces and class, interface and trait
Autoloader works according to [PSR-4](). That means namespaces and class, interface and trait
names should correspond to file system paths except root namespace path that is defined by an alias.
For example, if standard alias `@app` refers to `/var/www/example.com/` then `\app\models\User` will be loaded from
......@@ -117,4 +117,4 @@ There are several classes provided by framework:
- Markdown
- Security
- StringHelper
- VarDumper
\ No newline at end of file
- VarDumper
Yii2 class loader
=================
Yii 2 class loader is PSR-0 compliant. That means it can handle most of the PHP
Yii 2 class loader is PSR-4 compliant. That means it can handle most of the PHP
libraries and frameworks out there.
In order to autoload a library you need to set a root alias for it.
......@@ -16,4 +16,4 @@ PEAR-style libraries
References
----------
- BaseYii::autoload
\ No newline at end of file
- BaseYii::autoload
......@@ -23,8 +23,7 @@
"phpdocumentor/reflection": "1.0.2"
},
"autoload": {
"psr-0": { "yii\\apidoc\\": "" }
"psr-4": { "yii\\apidoc\\": "" }
},
"target-dir": "yii/apidoc",
"bin": ["apidoc"]
}
......@@ -22,7 +22,6 @@
"ext-curl": "*"
},
"autoload": {
"psr-0": { "yii\\authclient\\": "" }
},
"target-dir": "yii/authclient"
"psr-4": { "yii\\authclient\\": "" }
}
}
......@@ -22,7 +22,6 @@
"twbs/bootstrap": "3.0.*"
},
"autoload": {
"psr-0": { "yii\\bootstrap\\": "" }
},
"target-dir": "yii/bootstrap"
"psr-4": { "yii\\bootstrap\\": "" }
}
}
......@@ -20,7 +20,6 @@
"yiisoft/yii2": "*"
},
"autoload": {
"psr-0": { "yii\\codeception\\": "" }
},
"target-dir": "yii/codeception"
"psr-4": { "yii\\codeception\\": "" }
}
}
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