PEAR::_PEAR() (Previous) (Next) PEAR::registerShutdownFunc()

View this page in Last updated: Sun, 24 Aug 2008
English | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Plain HTML

PEAR::getStaticProperty()

PEAR::getStaticProperty() -- スタティックプロパティを扱う (パッケージ開発者用)

説明

ほぼ、または完全にスタティックなクラスがあり、 スタティックプロパティが必要な場合、 それを模擬するためにこのメソッドを使用することができます。 例えば、メソッドの中で以下のようにします。


<?php
$myVar = &PEAR::getStaticProperty('myVar');
?>

リファレンスを使用する必要があることに注意して下さい。 さもないと、プロパティ値は永続しません!

パラメータ

  • string $class - getStaticProperty() のコール元のクラス名

  • string $var 取得する変数

返り値

mixed - 変数へのリファレンス。変数がセットされていない場合、 自動的に NULL に初期化されます。

PEAR::_PEAR() (Previous) (Next) PEAR::registerShutdownFunc()

Download Documentation Last updated: Sun, 24 Aug 2008
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.