benrowe/fqcn

PSR-4 namespace resolver

1.0.2 2018-01-17 22:49 UTC

This package is auto-updated.

Last update: 2024-11-20 10:19:45 UTC


README

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.