Ignore:
Timestamp:
03/19/10 17:22:08 (14 years ago)
Author:
pedroerp
Message:

Ticket #609 - Migrando instanciação das classes da engine para a factory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/workflow/branches/609/inc/engine/src/common/WfRuntime.php

    r2253 r2311  
    8686   * @access public 
    8787   */ 
    88   function WfRuntime(&$db)  
     88  function WfRuntime()  
    8989  { 
    9090    $this->child_name = 'WfRuntime'; 
    91     parent::Base($db); 
    92     require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'BaseActivity.php'); 
    93     require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'Process.php'); 
    94     require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'Instance.php'); 
    95     require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'common'.SEP.'WfSecurity.php'); 
    96      
     91    parent::Base(); 
     92 
    9793    //first the activity is not set 
    9894    $this->activity = null; 
    99     $this->instance = new Instance($this->db); 
    100     $this->process = new Process($this->db); 
    101     $this->security = new WfSecurity($this->db);  
     95    $this->instance = &Factory::newInstance('Instance'); 
     96    $this->process = &Factory::newInstance('Process'); 
     97    $this->security = &Factory::getInstance('WfSecurity'); 
    10298  } 
    10399 
     
    276272      return false; 
    277273    } 
    278     $base_activity = new BaseActivity($this->db); 
     274    $base_activity = &Factory::getInstance('BaseActivity', $this->db); 
    279275    $this->activity =& $base_activity->getActivity($activity_id, $with_roles, $with_agents); 
    280276    if (!$this->activity) 
Note: See TracChangeset for help on using the changeset viewer.