Download the PHP package uzbek/classtools without Composer
On this page you can find all versions of the php package uzbek/classtools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download uzbek/classtools
More information about uzbek/classtools
Files in uzbek/classtools
Package classtools
Short Description Find, extract and process classes from file system
License WTFPL
Homepage https://github.com/professor93/classtools
Informations about the package classtools
uzbek/classtools
Forked from https://github.com/hanneskod/classtools
Find, extract and process classes from the file system.
Installation
Install using composer. Exists as uzbek/classtools in the packagist repository. From the command line use:
composer require uzbek/classtools
Using the iterator
ClassIterator consumes a symfony finder and scans files for php classes, interfaces and traits.
Access the class map
getClassMap()
returns a map of class names to
SplFileInfo
objects.
Find syntax errors
Source files containing syntax errors can not be parsed and hence no information
on contained classes can be retrieved. Use getErrors()
to read the list of
encountered errors.
Iterate over ReflectionClass objects
ClassIterator is also a Traversable, that on iteration yields class names as keys and ReflectionClass objects as values.
Note that to use reflection the classes found in filesystem must be included in the environment. Enable autoloading to dynamically load classes from a ClassIterator.
Filter based on class properties
ClassIterator is filterable and filters are chainable.
Negate filters
Filters can also be negated by wrapping them in not()
method calls.
Transforming classes
Found class, interface and trait definitions can be transformed and written to a single file.