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
。