koriym/psr4list

Returns the name of the classes in PSR4 path

1.2.2 2022-06-28 09:31 UTC

This package is auto-updated.

Last update: 2024-12-01 00:08:39 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);
}