dflydev / psr0-resource-locator-composer
Composer PSR-0 Resource Locator
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-10-29 03:48:17 UTC
README
The Composer PSR-0 Resource Locator implementation leverages dflydev/composer-autoload to locate the effective Composer autoloader in use at runtime and accesses its namespace map.
See dflydev/psr0-resource-locator for more information on the PSR-0 Resource Locator interface.
Requirements
Installation
This library can installed by Composer.
Usage
<?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', );
License
MIT, see LICENSE.
Community
If you have questions or want to help out, join us in the #dflydev channel on irc.freenode.net.