Public Member Functions | |
| & | getSingleton ($className) |
| Get a singleton instance. | |
Definition at line 25 of file KjwUtil.php.
| & KjwUtil::getSingleton | ( | $ | className | ) |
Get a singleton instance.
You call your singleton class like this: $theClassInstance = &KjwSingleton::getInstance("ClassName"[, optional arguments]);
| $className | The name of the class. If not included yet, this should be the same as the filename. | |
| ... | Optional arguments to the constructor. |
You can't pass variables by reference, due to the way PHP4 func_get_args works. If you want references, hand them to the instance afterwards.
Definition at line 38 of file KjwUtil.php.
1.5.8