0
我一直在用composer設置CodeIgniter項目。我想包括存儲在vendor
文件夾以外的文件中的php
類 - 在shared
文件夾中。作曲家 - 供應商文件夾外的CodeIgniter中的自動載入類
我的目錄結構:
/
--application/
--shared/
-application/
-class1.php
-class2.php
-class3.php
-base/
-classb1.php
--vendor/
--composer.json
--composer.lock
在作曲家documentation看,我看到有根包,我試圖使用加載在shared
目錄類的autoload
財產。這些類不是名稱空間。
我composer.json
文件如下:
{
"description" : "The CodeIgniter Application with Composer",
"require": {
"php": ">=5.3.2",
"codeigniter/framework": "3.1.*"
},
"require-dev": {
"mikey179/vfsStream": "1.1.*"
},
"autoload":{
"psr-0":{
"":"shared/application/",
"":"shared/base/",
"":"shared/data/"
}
}
}
我的搜索導致我this question,但仍然沒有被加載的類。我在終端上跑了composer update
。