Composer类映射和加载非标准扩展的文件 [英] Composer classmap and loading files with non-standard extensions

查看:196
本文介绍了Composer类映射和加载非标准扩展的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过编写器 classmap 功能加载文件时,可以加载具有非标准扩展名(例如 myFileName.stub )的PHP文件; myFileName.foo

When loading files through the composer classmap functionality is it possible to load PHP files that have non-standard extensions such as myFileName.stub or myFileName.foo ?

目前似乎无法载入。

推荐答案

Composer目前包含具有以下扩展名的文件:

Composer will currently include files with the following extensions:

.php
.inc
.hh

.php .inc .hh

最后一个是HHVM的东西。

The last one is for HHVM stuff.

生成器:

https://github.com/composer/composer/blob/master/src/Composer/Autoload/ClassMapGenerator.php#L62
https://github.com/composer/composer/blob/master/src/Composer /Autoload/ClassMapGenerator.php#L76

所以,看起来你需要一个自定义地图生成器...

So, looks like you'll need a custom map generator...

这篇关于Composer类映射和加载非标准扩展的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆