public function getTraitNamesByType($type)
    {
        if (empty($this->types[$type]['traits'])) {
            $this->types[$type]['traits'] = [];

            $this->recursiveGetTraitNames(new ReflectionClass($type), $this->types[ $type ]['traits']);
        }

        return $this->types[$type]['traits'];
    }
public function getTraitNamesByType($type)
    {
        if (empty($this->types[$type]['traits'])) {
            $this->types[$type]['traits'] = [];

            $this->recursiveGetTraitNames(new ReflectionClass($type), $this->types[ $type ]['traits']);
        }

        return $this->types[$type]['traits'];
    }
public function getTraitNamesByType ( $ type ) { if ( empty ( $ this -> types [ $ type ] [ 'traits' ] ) ) { $ this -> types [ $ type ] [ 'traits' ] = [ ] ; $ this -> recursiveGetTraitNames ( new ReflectionClass ( $ type ) , $ this -> types [ $ type ] [ 'traits' ] ) ; } return $ this -> types [ $ type ] [ 'traits' ] ; }
Return trait names by object.

Note: $type does not need to be directly registered, because we need to support subclasses, which call can have
different traits impelemnted!

@param  string $type
@return array
Return trait names by object .