koriym/psr4list

Returns the name of the classes in PSR4 path

1.0.2 2020-05-27 07:23 UTC

This package is auto-updated.

Last update: 2020-05-27 07:24:24 UTC


README

Scrutinizer Code Quality Code Coverage Build Status

It gets the name of each of the files and class names of a particular PSR4 path.

Installation

$ composer require koriym/psr4list

Usage

use Koriym\Psr4List;

$list = new Psr4List;
$prefix = 'BEAR\Sunday';
$path = __DIR__ . '/src';

foreach ($list($prefix, $path) as list($class, $file)) {
    var_dump($class);
    var_dump($file);
}