예제 #1
0
파일: Video.php 프로젝트: magicproof/test
 /**
  * Set Db factory by config from Registry and set dbAdapter object
  */
 function __construct()
 {
     $DbSettings = Registry::get('settings');
     $config = $DbSettings['database'];
     $name = $DbSettings['database']['name'];
     $dbAdapter = Db::factory($name, $config);
     parent::__construct($dbAdapter, 'video');
 }
예제 #2
0
 /**
  * call auto loader and set Registry with application config
  */
 public function run()
 {
     spl_autoload_register(array($this, 'load'));
     $settings = (require 'config' . DS . 'application.php');
     Registry::set('settings', $settings);
 }