Changeset 2233 for sandbox/workflow/branches/609/lib
- Timestamp:
- 03/12/10 10:59:32 (14 years ago)
- Location:
- sandbox/workflow/branches/609/lib/factory
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/branches/609/lib/factory/BaseFactory.php
r2222 r2233 154 154 /* not found */ 155 155 if (!($entry = $this->_getEntry($className))) 156 throw new Exception('You are not allowed to instantiate '.$className.' class.');156 throw new Exception('You are not allowed to instantiate \''.$className.'\' class.'); 157 157 158 $fullPath = $entry['basePath'] . SEP . $entry['path'] . SEP. $entry['filename'];158 $fullPath = $entry['basePath'] . '/' . $entry['path'] . '/' . $entry['filename']; 159 159 160 160 /* file not found */ -
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 } -
sandbox/workflow/branches/609/lib/factory/WorkflowFactory.php
r2223 r2233 49 49 /* registering allowed classes */ 50 50 $this->registerFileInfo('WorkflowObjects', 'class.WorkflowObjects.inc.php', 'inc'); 51 $this->registerFileInfo('WorkflowWatcher', 'class.WorkflowWatcher.inc.php', 'inc'); 52 $this->registerFileInfo('WorkflowLDAP', 'class.WorkflowLDAP.inc.php', 'inc'); 53 $this->registerFileInfo('WorkflowSecurity', 'class.WorkflowSecurity.inc.php', 'inc'); 54 $this->registerFileInfo('ResourcesRedirector', 'class.ResourcesRedirector.inc.php', 'inc'); 51 55 $this->registerFileInfo('TemplateServer', 'class.TemplateServer.inc.php', 'inc'); 56 $this->registerFileInfo('CachedLDAP', 'class.CachedLDAP.inc.php', 'inc'); 57 $this->registerFileInfo('BrowserInfo', 'class.BrowserInfo.inc.php', 'inc'); 58 52 59 $this->registerFileInfo('workflow_smarty', 'class.workflow_smarty.inc.php', 'inc'); 60 $this->registerFileInfo('workflow_acl', 'class.workflow_acl.inc.php', 'inc'); 61 $this->registerFileInfo('workflow_processmanager', 'class.workflow_processmanager.inc.php', 'inc'); 62 63 $this->registerFileInfo('bo_participants', 'class.bo_participants.inc.php', 'inc'); 53 64 54 65 /* registering egw class example */ 55 //$this->registerFileInfo('db', 'x', 'inc', PHPGW_API_INC); 66 $this->registerFileInfo('phpgw', 'class.phpgw.inc.php', '', EGW_INC_ROOT); 67 $this->registerFileInfo('db', 'class.db.inc.php', '', EGW_INC_ROOT); 68 $this->registerFileInfo('accounts', 'class.accounts.inc.php', '', EGW_INC_ROOT); 56 69 57 70 /* ok. no more instances of this class.. */
Note: See TracChangeset
for help on using the changeset viewer.