ReflectionClass::getTraitNames

(PHP 5 >= 5.4.0, PHP 7, PHP 8)

ReflectionClass::getTraitNames返回這個(gè)類(lèi)所使用 traits 的名稱(chēng)的數(shù)組

說(shuō)明

public ReflectionClass::getTraitNames(): array

警告

本函數(shù)還未編寫(xiě)文檔,僅有參數(shù)列表。

參數(shù)

此函數(shù)沒(méi)有參數(shù)。

返回值

返回的數(shù)組的值包含了 trait 的名稱(chēng)。 出現(xiàn)錯(cuò)誤的情況下返回 null。