sajadsdi/php-reflection 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sajadsdi/php-reflection

最新稳定版本:1.0.0

Composer 安装命令:

composer require sajadsdi/php-reflection

包简介

Tools for get class reflection

README 文档

README

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!

统计信息

  • 总下载量: 35
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-11-26