class_uses

class_uses

(PHP 5 >= 5.4.0, PHP 7)

class_uses Return the traits used by the given class

Description

array class_uses ( mixed $class [, bool $autoload = true ] )

This function returns an array with the names of the traits that the given class uses. This does however not include any traits used by a parent class.

Parameters

class

An object (class instance) or a string (class name).

登录查看完整内容