codeinc / directory-classes-iterator
This package is abandoned and no longer maintained.
No replacement package was suggested.
Iterators to list PHP classes within local files
1.0.0
2018-10-16 08:50 UTC
Requires
- php: >=7.1
Requires (Dev)
- phpunit/phpunit: ^7
This package is auto-updated.
Last update: 2020-01-16 11:43:09 UTC
README
This package provides two directory iterators to list PHP classes :
The iterator loads the .php
files using include_once()
and then the ReflectionClass
API to detect classes found within the loaded files.
Usage
<?php use CodeInc\DirectoryClassesIterator\RecursiveDirectoryClassesIterator; use CodeInc\DirectoryClassesIterator\DirectoryClassesIterator; // recursive listing $iterator = new RecursiveDirectoryClassesIterator('/path/to/libriaries'); // recursive listing with specific extensions $iterator = new RecursiveDirectoryClassesIterator('/path/to/libriaries', ['php', 'phtml', 'inc']); // non recursive listing $iterator = new DirectoryClassesIterator('/path/to/libriaries');
Installation
This library is available through Packagist and can be installed using Composer:
composer require codeinc/directory-classes-iterator
License
The library is published under the MIT license (see LICENSE
file).