Exemple #1
0
 /**
  * singleton getter
  *
  * @param void
  * @return PApps
  */
 public static function get()
 {
     if (!isset(self::$_instance)) {
         $c = __CLASS__;
         self::$_instance = new $c();
     }
     return self::$_instance;
 }
Exemple #2
0
 /**
  * Constructor
  */
 public function __construct()
 {
     // instantiate the dao
     $db = PVars::getObj('config_rdbms');
     if (!$db) {
         throw new PException('DB config error!');
     }
     $dao = PDB::get($db->dsn, $db->user, $db->password);
     $this->dao =& $dao;
     MOD_params::get()->loadParams();
 }
Exemple #3
0
 /**
  * used to instantiate an RoxEntityFactory - other than that, just calls the parent
  *
  * @access public
  */
 public function __construct()
 {
     MOD_params::get()->loadParams();
     $this->_entity_factory = new RoxEntityFactory();
     parent::__construct();
 }