Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Reflection Laravel Package

sajadsdi/php-reflection

Lightweight wrapper around PHP’s built-in Reflection API. Inspect classes by name or instance and quickly fetch ReflectionClass plus lists of properties, methods, and constants. Simple Reflections helper for common reflection tasks.

View on GitHub
Deep Wiki
Context7

PHP Reflection

The PHP Reflection library provides a set of tools for performing class reflection in PHP. It allows you to retrieve information about classes, properties, methods, and constants using PHP's built-in reflection capabilities.

Installation

You can install the PHP Reflection library via Composer. Run the following command in your project directory:

composer require sajadsdi/php-reflection

Usage

To use the Reflections library, follow these steps:

  1. Import the Reflections class into your PHP file:
use Sajadsdi\PhpReflection\Reflections;
  1. Create an instance of the Reflections class (use singleton for better performance):
$reflections = new Reflections();

3.0. Perform class reflection:

$class = new MyClass();
$reflectionClass = $reflections->reflection($class);

//or
$reflectionClass = $reflections->reflection(MyClass::class);

3.1.Retrieve properties, methods, or constants:

$properties = $reflections->properties(MyClass::class);
$methods = $reflections->methods(MyClass::class);
$constants = $reflections->constants(MyClass::class);

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.

License

This library is open-source and released under the MIT License. See the LICENSE file for more information.

Credits

The PHP Reflection library is developed and maintained by SajaD SaeeDi.

Feel free to use this library in your projects and enjoy the power of class reflection in PHP!

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource