ReflectionClass::getInterfaces

(PHP 5, PHP 7)

ReflectionClass::getInterfaces锟斤拷取锟接匡拷

说锟斤拷

public ReflectionClass::getInterfaces ( void ) : array

锟斤拷取锟接口★拷

锟斤拷锟斤拷

锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷

锟斤拷锟斤拷值

锟接口的癸拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷墙涌冢锟絠nterface锟斤拷锟斤拷锟斤拷锟狡o拷锟斤拷锟斤拷锟街碉拷锟� ReflectionClass 锟斤拷锟斤拷

锟斤拷锟斤拷

Example #1 ReflectionClass::getInterfaces() 锟斤拷锟斤拷

<?php
interface Foo { }

interface 
Bar { }

class 
Baz implements FooBar { }

$rc1 = new ReflectionClass("Baz");

print_r($rc1->getInterfaces());
?>

锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�

Array
(
    [Foo] => ReflectionClass Object
        (
            [name] => Foo
        )

    [Bar] => ReflectionClass Object
        (
            [name] => Bar
        )

)

锟轿硷拷