Changeset 2264


Ignore:
Timestamp:
03/16/10 14:48:39 (14 years ago)
Author:
pedroerp
Message:

Ticket #609 - Substituindo todas as chamadas à CreateObject? no módulo pela nova factory.

Location:
sandbox/workflow/branches/609
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • sandbox/workflow/branches/609/inc/class.WorkflowUtils.inc.php

    r2253 r2264  
    102102                        $this->start            = (int)get_var('start', 'any', 0); 
    103103                        $this->search_str       = get_var('find', 'any', ''); 
    104                         $this->nextmatchs       = CreateObject('phpgwapi.nextmatchs'); 
     104                        $this->nextmatchs       = Factory::getInstance('nextmatchs'); 
    105105                } 
    106106 
  • sandbox/workflow/branches/609/inc/class.bo_agent_mail_smtp.inc.php

    r2253 r2264  
    110110                parent::bo_agent(); 
    111111                $this->so_agent = Factory::getInstance('so_agent_mail_smtp'); 
    112                 $this->bo_emailadmin = CreateObject('emailadmin.bo'); 
     112                $this->bo_emailadmin = Factory::getInstance('bo'); 
    113113                //the showProcessConfigurationFields is not done here, quite harder to build 
    114114                $this->ProcessConfigurationFieldsdefault = array( 
     
    312312        function init() 
    313313        { 
    314                 $this->mail = CreateObject('phpgwapi.phpmailer'); 
     314                $this->mail = Factory::getInstance('phpmailer'); 
    315315                //set the $this->conf 
    316316                $this->getProcessConfigurationFields($this->activity->getProcessId()); 
     
    674674                                        if (!is_object($this->account)) 
    675675                                        { 
    676                                                 $this->account = CreateObject('phpgwapi.accounts'); 
     676                                                $this->account = Factory::getInstance('accounts'); 
    677677                                        } 
    678678                                        $ask_user = $this->instance->getOwner(); 
     
    687687                                        if (!is_object($this->account)) 
    688688                                        { 
    689                                                 $this->account = CreateObject('phpgwapi.accounts'); 
     689                                                $this->account = Factory::getInstance('accounts'); 
    690690                                        } 
    691691                                        $my_subset = array('wf_activity_name' => $this->activity->getName()); 
     
    718718                                                        if (!is_object($this->account)) 
    719719                                                        { 
    720                                                                 $this->account = CreateObject('phpgwapi.accounts'); 
     720                                                                $this->account = Factory::getInstance('accounts'); 
    721721                                                        } 
    722722                                                        $ask_user = $this->account->name2id($second_part); 
     
    735735                                                        if (!is_object($this->account)) 
    736736                                                        { 
    737                                                                 $this->account = CreateObject('phpgwapi.accounts'); 
     737                                                                $this->account = Factory::getInstance('accounts'); 
    738738                                                        } 
    739739                                                        $my_subset = array('wf_role_name' => $second_part); 
  • sandbox/workflow/branches/609/inc/class.bo_monitors.inc.php

    r2233 r2264  
    13971397                /* prepare the environment to load some configuration values from other module */ 
    13981398                $GLOBALS['phpgw']->db =& Factory::getInstance('WorkflowObjects')->getDBExpresso(); 
    1399                 $GLOBALS['phpgw']->common = CreateObject('phpgwapi.common'); 
    1400                 $GLOBALS['phpgw']->session = CreateObject('phpgwapi.sessions'); 
     1399                $GLOBALS['phpgw']->common = Factory::getInstance('common'); 
     1400                $GLOBALS['phpgw']->session = Factory::getInstance('sessions'); 
    14011401                function lang($a){return $a;}; 
    14021402 
    14031403                /* get the required configuration */ 
    1404                 $BOEmailAdmin = Factory::newForeignInstance('emailadmin', 'bo'); 
     1404                $BOEmailAdmin = Factory::getInstance('bo') 
    14051405                $profileList = $BOEmailAdmin->getProfileList(); 
    14061406                $profile = $BOEmailAdmin->getProfile($profileList[0]['profileID']); 
  • sandbox/workflow/branches/609/inc/class.bo_workflow_forms.inc.php

    r795 r2264  
    9090                        $this->sort_mode        = $this->order . '__' . $this->sort; 
    9191                        $this->search_str       = get_var('find', 'any', ''); 
    92                         $this->nextmatchs       = CreateObject('phpgwapi.nextmatchs'); 
     92                        $this->nextmatchs       = Factory::getInstance('nextmatchs'); 
    9393                         
    9494                        // number of rows allowed 
  • sandbox/workflow/branches/609/inc/class.run_activity.inc.php

    r2253 r2264  
    211211                        //$this->process                = Factory::getInstance('workflow_process'); 
    212212                        $this->GUI              = Factory::getInstance('workflow_gui'); 
    213                         $this->categories       = CreateObject('phpgwapi.categories'); 
     213                        $this->categories       = Factory::getInstance('categories'); 
    214214 
    215215                        $this->workflowSmarty = Factory::getInstance('workflow_smarty', false); 
  • sandbox/workflow/branches/609/inc/class.ui_orgchart.inc.php

    r2253 r2264  
    106106                require_once(dirname(__FILE__) . SEP . 'engine' . SEP . 'src' . SEP . 'ProcessManager' . SEP . 'GraphViz.php'); 
    107107 
    108                 $config_values = CreateObject('phpgwapi.config','workflow'); 
     108                $config_values = Factory::getInstance('config', 'workflow'); 
    109109                $config_values->read_repository(); 
    110                 $conf_db = $config_values->config_data;  
    111                 $db = CreateObject('phpgwapi.db'); 
     110                $conf_db = $config_values->config_data; 
     111                $db = Factory::getInstance('db'); 
    112112                $db->connect( 
    113113                        $conf_db['database_name'], 
  • sandbox/workflow/branches/609/inc/engine/config.egw.inc.php

    r2253 r2264  
    325325        function galaxia_get_config_values($parameters=array()) 
    326326        { 
    327                         $config = CreateObject('phpgwapi.config'); 
     327                        $config = Factory::getInstance('config'); 
    328328                        $config->read_repository(); 
    329329 
  • sandbox/workflow/branches/609/inc/hook_home.inc.php

    r2253 r2264  
    4242} 
    4343$extra_data .= "</table></div>"; 
    44 $portalbox = CreateObject('phpgwapi.listbox', 
     44$portalbox = Factory::getInstance('listbox', 
    4545        Array( 
    4646                'title'     => $title, 
  • sandbox/workflow/branches/609/inc/local/classes/class.wf_mail.php

    r795 r2264  
    3939                $requiredConfiguration = array('mail_smtp_profile' => false); 
    4040                $configuration = $GLOBALS['workflow']['wf_runtime']->process->getConfigValues($requiredConfiguration); 
    41                 $bo_emailadmin = CreateObject('emailadmin.bo'); 
     41                $bo_emailadmin = Factory::getInstance('bo'); 
    4242                $profileData = $bo_emailadmin->getProfile($configuration['mail_smtp_profile']); 
    4343 
  • sandbox/workflow/branches/609/lib/factory/WorkflowFactory.php

    r2253 r2264  
    6868 
    6969                $this->registerFileInfo('bo_participants', 'class.bo_participants.inc.php', 'inc'); 
     70                $this->registerFileInfo('so_agent_mail_smtp', 'class.so_agent_mail_smtp.inc.php', 'inc'); 
    7071 
    71                 /* registering egw class example */ 
     72                /* registering egw external classes */ 
    7273                $this->registerFileInfo('phpgw', 'class.phpgw.inc.php', '', EGW_INC_ROOT); 
    7374                $this->registerFileInfo('db', 'class.db.inc.php', '', EGW_INC_ROOT); 
    7475                $this->registerFileInfo('accounts', 'class.accounts.inc.php', '', EGW_INC_ROOT); 
     76                $this->registerFileInfo('config', 'class.config.inc.php', '', EGW_INC_ROOT); 
     77                $this->registerFileInfo('common', 'class.common.inc.php', '', EGW_INC_ROOT); 
     78                $this->registerFileInfo('session', 'class.session.inc.php', '', EGW_INC_ROOT); 
     79                $this->registerFileInfo('nextmachs', 'class.nextmatchs.inc.php', '', EGW_INC_ROOT); 
     80                $this->registerFileInfo('categories', 'class.categories.inc.php', '', EGW_INC_ROOT); 
     81                $this->registerFileInfo('listbox', 'class.listbox.inc.php', '', EGW_INC_ROOT); 
     82                $this->registerFileInfo('phpmailer', 'class.phpmailer.inc.php', '', EGW_INC_ROOT); 
     83 
     84                /** 
     85                 * It can cause some troubles. A class named 'bo' must be instantiated by a 
     86                 * Factory::getInstance('bo') call, that isn't really intuitive.. Something to 
     87                 * think about... 
     88                 */ 
     89                $this->registerFileInfo('bo', 'class.bo.inc.php', 'emailadmin/inc', EGW_SERVER_ROOT); 
    7590 
    7691 
    7792                /** 
    7893                 * TODO - This is a veeery big workaround to maintain compatibility with 
    79                  * processes that uses the old not-static factory. So, we made this wrapper 
     94                 * processes that uses the old non-static factory. So, we made this wrapper 
    8095                 * (adapter) that just calls the new and cute static factory class in the 
    8196                 * right way. It should be removed as soon as possible. 
Note: See TracChangeset for help on using the changeset viewer.