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

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

PEAR::getStaticProperty()

PEAR::getStaticProperty() -- handle static properties (package developer related)

Description

If you have a class that's mostly/entirely static, and you need static properties, you can use this method to simulate them. Eg. in your method(s) do this:


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

You must use a reference, or they will not persist!

Parameter

  • string $class - the name of your class, where you call getStaticProperty()

  • string $var the variable to retrieve.

Return value

mixed - A reference to the variable. If not set, it will be auto initialised to NULL.

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

Download Documentation Last updated: Sun, 20 Jul 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.