Skip to content

Commit

Permalink
update LICENSE and README
Browse files Browse the repository at this point in the history
  • Loading branch information
alekitto committed Feb 19, 2021
1 parent e7ed0d7 commit 66d001d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Alessandro Chitolina
Copyright (c) 2018-2021 Alessandro Chitolina

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ from composer and resolving PSR-* namespaces accordingly.
### Basic usage

```php
use Kcs\ClassFinder\Finder\ComposerFinder;

$finder = new ComposerFinder();
foreach ($finder as $className => $reflector) {
// Do magic things...
Expand All @@ -38,6 +40,10 @@ You can filter classes using the methods exposed by `FinderInterface`:
all the given interfaces. You can pass a single interface as string.
- `subclassOf(string $superClass)`: Finds all the classes that are subclasses
of the given class.
- `annontatedBy(string $annotationClass)`: Finds all the classes that have
the given annotation in the class docblock.
- `withAttribtue(string $attributeClass)`: Finds all the classes that have
the given attribute applied on the class (PHP >= 8.0) only.
- `in(array $dirs)`: Searches only in given directories.
- `inNamespace(array $namespaces)`: Searches only in given namespaces.
- `filter(callable $callback)`: Custom filtering callback.
Expand All @@ -54,3 +60,4 @@ Please feel free to open a PR or file an issue.
---

Thank you for reading
A.

0 comments on commit 66d001d

Please sign in to comment.