https://github.com/dflydev/dflydev-psr0-resource-locator-composer
Composer PSR-0 Resource Locator
https://github.com/dflydev/dflydev-psr0-resource-locator-composer
Last synced: 11 months ago
JSON representation
Composer PSR-0 Resource Locator
- Host: GitHub
- URL: https://github.com/dflydev/dflydev-psr0-resource-locator-composer
- Owner: dflydev
- License: mit
- Created: 2012-10-19T04:55:20.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2014-07-16T21:19:34.000Z (almost 12 years ago)
- Last Synced: 2025-04-14T02:28:47.221Z (about 1 year ago)
- Language: PHP
- Size: 179 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Composer PSR-0 Resource Locator
===============================
The Composer [PSR-0][1] Resource Locator implementation leverages
[dflydev/composer-autoload][2] to locate the effective Composer autoloader
in use at runtime and accesses its namespace map.
See [dflydev/psr0-resource-locator][3] for more information on
the [PSR-0][1] Resource Locator interface.
Requirements
------------
* PHP 5.3+
* [dflydev/psr0-resource-locator][3]
* [dflydev/composer-autoload][2]
Installation
------------
This library can installed by [Composer][4].
Usage
-----
```php
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][5]
channel on irc.freenode.net.
[1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
[2]: https://github.com/dflydev/dflydev-composer-autoload
[3]: https://github.com/dflydev/dflydev-psr0-resource-locator
[4]: http://getcomposer.org/
[5]: irc://irc.freenode.net/#dflydev