Diff of /mambo/branches/4.6/includes/core.classes.php
Parent Directory
|
Revision Log
|
Patch
| revision 610, Tue Jul 18 12:39:51 2006 UTC | revision 611, Sun Jul 23 17:59:26 2006 UTC | |
|---|---|---|
| # | Line 2200 | Line 2200 |
| 2200 | } | } |
| 2201 | ||
| 2202 | /** | /** |
| 2203 | * Singleton get instance | * @param object |
| * @param object the mainframe instance (if called internally) | ||
| * Note that because of the need for creation parameters, this cannot | ||
| * be called successfully unless the mainframe object is already created | ||
| 2204 | */ | */ |
| 2205 | function &getInstance () { | function &getInstance () { |
| 2206 | static $mainframe; | global $mainframe; |
| 2207 | if (func_num_args()) { | if (isset($mainframe)) { |
| 2208 | $args = func_get_args(); | return $mainframe; |
| 2209 | $mainframe = $args[0]; | } else { |
| 2210 | } | $result = null; |
| if (isset($mainframe)) $result =& $mainframe; | ||
| else $result = null; | ||
| 2211 | return $result; | return $result; |
| 2212 | } | } |
| 2213 | } | |
| 2214 | ||
| 2215 | /** | /** |
| 2216 | * @param string | * @param string |
| 2217 | */ | */ |
|
||||||||
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

