PHPackages                             dflydev/psr0-resource-locator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dflydev/psr0-resource-locator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dflydev/psr0-resource-locator
=============================

PSR-0 Resource Locator

38591PHP

Since Jul 16Pushed 11y ago1 watchersCompare

[ Source](https://github.com/dflydev/dflydev-psr0-resource-locator)[ Packagist](https://packagist.org/packages/dflydev/psr0-resource-locator)[ RSS](/packages/dflydev-psr0-resource-locator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PSR-0 Resource Locator
======================

[](#psr-0-resource-locator)

Locate resources by namespaceish paths using [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) mappings.

Locating resources relative to a class within the same package can be done by `__DIR__.'/../Resources`. The downside to this method is that it only works if the target resources are in the same package.

This project aims to allow for locating resources from any namespace whether the intended directory is in the same package or not.

The term *namespaceish* is used instead of namespace as it should be understood that we are overloading the [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) conventions to find *files* and not PHP code. In fact, we may often be looking for directories under a namespace that are in fact not namespaces at all.

Requirements
------------

[](#requirements)

- PHP 5.3+
- A PSR-0 Resource Locator Implementation
    - Composer — [dflydev/psr0-resource-locator-composer](https://github.com/dflydev/dflydev-psr0-resource-locator-composer)

Installation
------------

[](#installation)

This library can installed by [Composer](http://getcomposer.org/).

Usage
-----

[](#usage)

The following is an example using the Composer PSR-0 Resource Locator implementation ([dflydev/psr0-resource-locator-composer](https://github.com/dflydev/dflydev-psr0-resource-locator-composer)):

```
