benrowe / fqcn
PSR-4 namespace resolver
Installs: 9 936
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 2
Open Issues: 0
Requires
- php: ~7.0
Requires (Dev)
- phpmd/phpmd: @stable
- phpunit/phpunit: ~5.0
- scrutinizer/ocular: ^1.3
- squizlabs/php_codesniffer: ^2.3
README
Help resolve psr4 based namespaces to directories and thus related language constructs (classes, interfaces & traits).
Install
The best way to install this package is via composer.
$ composer require benrowe/fqcn
Usage
<?php $composer = require './vendor/autoload.php'; $resolver = \Benrowe\Fqcn\Resolver('Benrowe\Fqcn', $composer); // get an array of available directories that map to this namespace $dirs = $resolver->findDirectories();
With the factory
<?php $composer = require './vendor/autoload.php'; $factory = new \Benrowe\Fqcn\Factory($composer); // get an array of available directories that map to this namespace $dirs = $factory->make('Benrowe\Fqcn')->findDirectories(); $constructs = $factory->make('Benrowe\Fqcn')->findConstructs();
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please email ben.rowe.83@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.