classifier

Classifier traverses file system to find classes by a certain criteria.

BSD-3-CLAUSE License

Downloads
582
Stars
8
Committers
10

Classifier traverses file system to find classes by a certain criteria.

Requirements

  • PHP 8.0 or higher.

Installation

The package could be installed with Composer:

composer require yiisoft/classifier

Documentation

Usage of classifier is the following:

use \Yiisoft\Classifier\Classifier;
use \Psr\SimpleCache\CacheInterface;

$cacheInstances = (new Classifier('src'))
    ->withInterface(CacheInterface::class) // can use ->withParentClass() instead
    ->withAttribute(MyAttribute::class)
    ->find();

You specify one more directories to traverse, interfaces, base classes, attributes to search for and call find() method which returns a list of classes found.

If you need help or have a question, the Yii Forum is a good place for that. You may also check out other Yii Community Resources.

License

The Yii Classifier is free software. It is released under the terms of the BSD License. Please see LICENSE for more information.

Maintained by Yii Software.

Support the project

Follow updates