dispify / class_aliases
The function for getting class aliases
1.0.0
2020-08-30 11:23 UTC
Requires
- php: ^7.1
Requires (Dev)
- phpunit/phpunit: ^7.5
This package is auto-updated.
Last update: 2024-10-29 06:00:05 UTC
README
class_aliases
There is a class_parents, class_uses, class_implements function in the PHP. PHP allows to declare aliases of class but there is no class_aliases function which returns all aliases for specified class name. This library adds this functionality.
Getting Started
$ composer require dispify/class_aliases
class A {}
class_alias(A::class, 'Alias');
Dispify\class_aliases(A::class); // returns ['alias']
⚠️ The class is created by class_alias is lowercased!