Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

About

Iterators to list all the PHP classes within a directory

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DirectoryClassesIterator

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).

About

Iterators to list all the PHP classes within a directory

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages