Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 20 days ago
JSON representation

Simple reflection helper for PHP.

Awesome Lists containing this project

README

        

# Mem (Simple Realtime Cache for PHP)

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