PHP 8.1.28 Released!

ReflectionClass::getInterfaces

(PHP 5, PHP 7, PHP 8)

ReflectionClass::getInterfacesArayüzleri döndürür

Açıklama

public ReflectionClass::getInterfaces(): array

Arayüzleri döndürür.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

Anahtarların arayüz isimlerini, değerlerin ise ReflectionClass nesnelerini içerdiği bir dizi döner.

Örnekler

Örnek 1 - ReflectionClass::getInterfaces() örneği

<?php
interface Foo { }

interface
Bar { }

class
Baz implements Foo, Bar { }

$rc1 = new ReflectionClass("Baz");

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

Yukarıdaki örnek şuna benzer bir çıktı üretir:

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

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

)

Ayrıca Bakınız

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top