https://github.com/nabeghe/reflecty-php
Simple reflection helper for PHP.
https://github.com/nabeghe/reflecty-php
php php-helper php-helpers php-library php-reflection reflection
Last synced: about 2 months ago
JSON representation
Simple reflection helper for PHP.
- Host: GitHub
- URL: https://github.com/nabeghe/reflecty-php
- Owner: nabeghe
- License: mit
- Created: 2024-10-22T18:01:24.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-12-26T12:29:47.000Z (6 months ago)
- Last Synced: 2025-04-16T00:59:33.898Z (about 2 months ago)
- Topics: php, php-helper, php-helpers, php-library, php-reflection, reflection
- Language: PHP
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Reflecty
> Simple reflection helper for PHP.
## 🫡 Usage
### 🚀 Installation
You can install the package via composer:
```bash
composer require nabeghe/reflecty
```
### Example - Class Ancestors
```php
use Nabeghe\Reflecty\Reflecty;class Animal
{
}class Lion extends Animal
{
}class Cat extends Lion
{
}print_r(Reflecty::classAncestors(Cat::class));
/*
Array
(
[0] => Lion
[1] => Animal
)
*/
```
## 📖 License
Copyright (c) Hadi Akbarzadeh
Licensed under the MIT license, see [LICENSE.md](LICENSE.md) for details.