ReflectionClass::getInterfaces
(PHP 5, PHP 7)
ReflectionClass::getInterfaces — インターフェイスを取得する
説明
public ReflectionClass::getInterfaces ( ) : array
インターフェイスを取得します。
パラメータ
この関数にはパラメータはありません。
例
例1 ReflectionClass::getInterfaces() の例
<?phpinterface Foo { }interface Bar { }class Baz implements Foo, Bar { }$rc1 = new ReflectionClass("Baz");print_r($rc1->getInterfaces());?>
上の例の出力は、 たとえば以下のようになります。
Array ( [Foo] => ReflectionClass Object ( [name] => Foo ) [Bar] => ReflectionClass Object ( [name] => Bar ) )