Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 587 Bytes

README.md

File metadata and controls

53 lines (35 loc) · 587 Bytes

Reflecty

Simple reflection helper for PHP.


🫡 Usage

🚀 Installation

You can install the package via composer:

composer require nabeghe/reflecty

Example - Class Ancestors

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