2022-04-15 15:08:34 +00:00
|
|
|
# ZM\Utils\ReflectionUtil
|
|
|
|
|
|
|
|
|
|
## getParameterClassName
|
|
|
|
|
|
|
|
|
|
```php
|
2022-08-22 07:39:44 +00:00
|
|
|
public function getParameterClassName(ReflectionParameter $parameter): string
|
2022-04-15 15:08:34 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 描述
|
|
|
|
|
|
2022-08-22 07:39:44 +00:00
|
|
|
作者很懒,什么也没有说
|
2022-04-15 15:08:34 +00:00
|
|
|
|
|
|
|
|
### 参数
|
|
|
|
|
|
|
|
|
|
| 名称 | 类型 | 描述 |
|
|
|
|
|
| -------- | ---- | ----------- |
|
2022-08-22 07:39:44 +00:00
|
|
|
| parameter | ReflectionParameter | |
|
2022-04-15 15:08:34 +00:00
|
|
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
|
|
|
|
| 类型 | 描述 |
|
|
|
|
|
| ---- | ----------- |
|
2022-08-22 07:39:44 +00:00
|
|
|
| string | |
|
2022-04-15 15:08:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
## variableToString
|
|
|
|
|
|
|
|
|
|
```php
|
|
|
|
|
public function variableToString(mixed $var): string
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 描述
|
|
|
|
|
|
2022-08-22 07:39:44 +00:00
|
|
|
作者很懒,什么也没有说
|
2022-04-15 15:08:34 +00:00
|
|
|
|
|
|
|
|
### 参数
|
|
|
|
|
|
|
|
|
|
| 名称 | 类型 | 描述 |
|
|
|
|
|
| -------- | ---- | ----------- |
|
|
|
|
|
| var | mixed | |
|
|
|
|
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
|
|
|
|
| 类型 | 描述 |
|
|
|
|
|
| ---- | ----------- |
|
|
|
|
|
| string | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## isNonStaticMethod
|
|
|
|
|
|
|
|
|
|
```php
|
2022-08-22 07:39:44 +00:00
|
|
|
public function isNonStaticMethod(mixed $callback): bool
|
2022-04-15 15:08:34 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 描述
|
|
|
|
|
|
2022-08-22 07:39:44 +00:00
|
|
|
作者很懒,什么也没有说
|
2022-04-15 15:08:34 +00:00
|
|
|
|
|
|
|
|
### 参数
|
|
|
|
|
|
|
|
|
|
| 名称 | 类型 | 描述 |
|
|
|
|
|
| -------- | ---- | ----------- |
|
2022-08-22 07:39:44 +00:00
|
|
|
| callback | mixed | |
|
2022-04-15 15:08:34 +00:00
|
|
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
|
|
|
|
| 类型 | 描述 |
|
|
|
|
|
| ---- | ----------- |
|
|
|
|
|
| bool | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## getCallReflector
|
|
|
|
|
|
|
|
|
|
```php
|
2022-08-22 07:39:44 +00:00
|
|
|
public function getCallReflector(mixed $callback): ReflectionFunctionAbstract
|
2022-04-15 15:08:34 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 描述
|
|
|
|
|
|
2022-08-22 07:39:44 +00:00
|
|
|
作者很懒,什么也没有说
|
2022-04-15 15:08:34 +00:00
|
|
|
|
|
|
|
|
### 参数
|
|
|
|
|
|
|
|
|
|
| 名称 | 类型 | 描述 |
|
|
|
|
|
| -------- | ---- | ----------- |
|
2022-08-22 07:39:44 +00:00
|
|
|
| callback | mixed | |
|
2022-04-15 15:08:34 +00:00
|
|
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
|
|
|
|
| 类型 | 描述 |
|
|
|
|
|
| ---- | ----------- |
|
|
|
|
|
| ReflectionFunctionAbstract | |
|
2022-08-23 15:43:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
## getMethod
|
|
|
|
|
|
|
|
|
|
```php
|
|
|
|
|
public function getMethod(string $class, string $method): ReflectionMethod
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 描述
|
|
|
|
|
|
|
|
|
|
作者很懒,什么也没有说
|
|
|
|
|
|
|
|
|
|
### 参数
|
|
|
|
|
|
|
|
|
|
| 名称 | 类型 | 描述 |
|
|
|
|
|
| -------- | ---- | ----------- |
|
|
|
|
|
| class | string | |
|
|
|
|
|
| method | string | |
|
|
|
|
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
|
|
|
|
| 类型 | 描述 |
|
|
|
|
|
| ---- | ----------- |
|
|
|
|
|
| ReflectionMethod | |
|