pine3ree/pine3ree-reflection-helper 问题修复 & 功能扩展

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

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

pine3ree/pine3ree-reflection-helper

最新稳定版本:1.0.0

Composer 安装命令:

composer require pine3ree/pine3ree-reflection-helper

包简介

A basic reflection helper

README 文档

README

Continuous Integration

This package provides a simple helper that return reflection classes for given object/class/function and cache the results.

<?php

use Closure;
use ReflectionClass;
use ReflectionFunction;
use ReflectionMethod;
use ReflectionParameter;
use ReflectionProperty;

use pine3ree\Helper\Reflection;

Reflection::getClass(object|class-string $objectOrClass); // @return ReflectionClass|null
Reflection::getProperties(object|class-string $objectOrClass); // @return array<string|ReflectionProperty>|null
Reflection::getProperty(object|class-string $objectOrClass, string $name); // @return ReflectionProperty|null
Reflection::getMethods(object|class-string $objectOrClass); // @return array<string|ReflectionMethod>|null
Reflection::getMethod(object|class-string $objectOrClass, string $name); // @return ReflectionMethod|null
Reflection::getConstructor(objectOrClass); // @return ReflectionMethod|null
Reflection::getFunction(string $function); // @return ReflectionFunction|null
Reflection::getParametersForMethod(object|class-string $objectOrClass, string $name, bool $check_existence = true); // @return array<int, ReflectionParameter>|null
Reflection::getParametersForConstructor(object|class-string $objectOrClass, bool  $check_existence = true); // @return ReflectionParameter[]|null
Reflection::getParametersForInvokable(object $invokable); // @return ReflectionParameter[]|null
Reflection::getParametersForFunction(string $function, bool $check_existence = true); // @return ReflectionParameter[]|null
Reflection::clearCache(string $type = self::CACHE_ALL): void

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2025-05-03