BetterReflection\Reflection\ReflectionClass::getTraitNames PHP 메소드

getTraitNames() 공개 메소드

You may optionally specify a source locator that will be used to locate the traits. If no source locator is given, a default will be used.
public getTraitNames ( ) : string[]
리턴 string[]
    public function getTraitNames()
    {
        return array_map(function (ReflectionClass $trait) {
            return $trait->getName();
        }, $this->getTraits());
    }

Usage Example

예제 #1
0
 /**
  * {@inheritDoc}
  */
 public function getTraitNames()
 {
     return $this->betterReflectionClass->getTraitNames();
 }