PSR-4 namespace resolver
PHP
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
tests
.editorconfig
.gitattributes
.gitignore
.scrutinizer.yml
.styleci.yml
.travis.yml
CHANGELOG.md
CONDUCT.md
CONTRIBUTING.md
LICENSE.md
README.md
composer.json
phpunit.xml.dist

README.md

FQCN (Fully Qualitified Class Name)

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

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.