ReflectionClass::export

(PHP 5, PHP 7)

ReflectionClass::exportBir sınıf ihraç eder

Uyarı

Bu işlevin kullanımı PHP 7.4.0 itibariyle ÖNERİLMEMEKTE olup PHP 8.0.0'da tamamen KALDIRILMIŞTIR. Bu işleve kesinlikle güvenilmemelidir.

Açıklama

publicstaticReflectionClass::export(mixed$bağımsız_değişken, bool$return = false): string

Bir yansıtıcı sınıfı ihraç eder.

Uyarı

Bu işlev hala belgelendirilmemiştir; sadece bağımsız değişken listesi mevcuttur.

Bağımsız Değişkenler

bağımsız_değişken

İhraç edilecek Reflection nesnesi.

return

true belirtilirse yansıtmak yerine ihrac eder. false olursa (öntanımlıdır) tersini yapar.

Dönen Değerler

true belirtilirse bir dizge yoksa null döner.

Örnekler

Örnek 1 - ReflectionClass::export() temel kullanım örneği

<?php
class Apple {
public
$var1;
public
$var2 = 'Orange';

public function
type() {
return
'Apple';
}
}
ReflectionClass::export('Apple');
?>

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

Class [ <user> class Apple ] { @@ php shell code 1-8 - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [2] { Property [ <default> public $var1 ] Property [ <default> public $var2 ] } - Methods [1] { Method [ <user> public method type ] { @@ php shell code 5 - 7 } } }

Ayrıca Bakınız

To Top