\com\docClassMethod

获取类中方法、属性、注释

Summary

Methods
Properties
Constants
__construct()
getAction()
setClassName()
isParent()
setFilter()
getMethods()
getName()
getDoc()
get_this_class_methods()
$className
$reflection
$filter
$isParent
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$className

$className : string

要获取类名(路径)

Type

string

$reflection

$reflection : \ReflectionClass

反射类

Type

\ReflectionClass

$filter

$filter : 

方法过滤条件

Type

$isParent

$isParent : boolean

是否显示父类方法

Type

boolean

Methods

__construct()

__construct(string  $className = '',   $filter = '') 

构造函数(注:用 class_exists() 函数判断类是否存在)

Parameters

string $className

如:app\admin\controller\Roles

$filter

getAction()

getAction(  $isExtendClass = false) : array

返回控制器外露方法(增删改查等) Author: websky

Parameters

$isExtendClass

Returns

array

setClassName()

setClassName(string  $className = '') 

设置类名 Author: websky

Parameters

string $className

isParent()

isParent(boolean  $parent = true) 

是否显示父类方法 Author: websky

Parameters

boolean $parent

setFilter()

setFilter(array|string  $filter = '') 

设置返回方法过滤条件 Author: websky

Parameters

array|string $filter

[public,protected,private,abstract,final,static]

getMethods()

getMethods() : array<mixed,\ReflectionMethod>

返回所有方法名 Author: websky

Returns

array<mixed,\ReflectionMethod>

getName()

getName() : string

返回类名 Author: websky

Returns

string

getDoc()

getDoc(  $format = true) : string

返回类注释 Author: websky

Parameters

$format

Returns

string

get_this_class_methods()

get_this_class_methods(  $class = '') : \com\doc\array3

仅仅获取这个类的方法,不要父类的 Author: websky

Parameters

$class

int Y N 类名

Returns

\com\doc\array3 —

array 本类的所有方法构成的一个数组