koriym/psr4list

Returns the name of the classes in PSR4 path

1.0 2014-12-07 13:10 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.

Requirements

  • PHP 5.5+
  • hhvm

Installation

$ composer require koriym/psr4list ~1.0

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);
}