Changeset 2233 for sandbox/workflow/branches/609/lib/factory/Factory.php
- Timestamp:
- 03/12/10 10:59:32 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/branches/609/lib/factory/Factory.php
r2223 r2233 64 64 * @static 65 65 */ 66 public static function getInstance() {66 public static function &getInstance() { 67 67 68 68 /* oops. we are in the process space. */ … … 93 93 * Just forward this call to the correct class. 94 94 * 95 * @todo I must implement it!96 95 * @access public 97 96 * @retun object 98 97 * @static 99 98 */ 100 public static function newInstance() { 99 public static function &newInstance() { 100 101 /* oops. we are in the process space. */ 102 if (Security::isEnabled()) { 103 104 /* must instatiate it */ 105 if (is_null(self::$_securedFactory)) 106 self::$_securedFactory = new ProcessFactory(); 107 108 $args = func_get_args(); 109 return call_user_func_array(array(self::$_securedFactory, "newInstance"), $args); 110 111 } 112 /* regular module space */ 113 else { 114 115 /* must instatiate it */ 116 if (is_null(self::$_unsecuredFactory)) 117 self::$_unsecuredFactory = new WorkflowFactory(); 118 119 $args = func_get_args(); 120 return call_user_func_array(array(self::$_unsecuredFactory, "newInstance"), $args); 121 } 101 122 } 102 123 }
Note: See TracChangeset
for help on using the changeset viewer.