dflydev / psr0-resource-locator-composer
Composer PSR-0 资源定位器
dev-master / 1.0.x-dev
2014-07-16 21:19 UTC
Requires
- php: >=5.3.3
- dflydev/composer-autoload: 1.0.*@dev
- dflydev/psr0-resource-locator: 1.0.*@dev
Provides
- dflydev/psr0-resource-locator-implementation: 1.0.0-alpha
This package is auto-updated.
Last update: 2024-08-29 03:29:06 UTC
README
Composer PSR-0 资源定位器实现利用 dflydev/composer-autoload 定位运行时使用的有效 Composer 自动加载器,并访问其命名空间映射。
有关 PSR-0 资源定位器接口的更多信息,请参阅 dflydev/psr0-resource-locator。
要求
安装
此库可以通过 Composer 安装。
用法
<?php use Dflydev\Psr0ResourceLocator\Composer\ComposerResourceLocator; $resourceLocator = new ComposerResourceLocator; // Search all PSR-0 namespaces registered by Composer // to find the first directory found looking like: // "/Vendor/Project/Resources/mappings" $mappingDirectory = $resourceLocator->findFirstDirectory( 'Vendor\Project\Resources\mappings' ); // Search all PSR-0 namespaces registered by Composer // to find all templates directories looking like: // "/Vendor/Project/Resources/templates" $templateDirs = $resourceLocator->findDirectories( 'Vendor\Project\Resources\templates', );
许可
MIT,见 LICENSE。
社区
如果您有任何问题或想提供帮助,请加入 irc.freenode.net 上的 #dflydev 频道。