first commit
This commit is contained in:
24
Swoft_BackEndApi/bin/test.php
Executable file
24
Swoft_BackEndApi/bin/test.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
trait Tr
|
||||
{
|
||||
public function traitMethod()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class A
|
||||
{
|
||||
use Tr;
|
||||
|
||||
public function method()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$a = new ReflectionClass(A::class);
|
||||
foreach ($a->getTraits() as $traitClass){
|
||||
var_dump($traitClass->getMethods());
|
||||
}
|
||||
Reference in New Issue
Block a user