Beispiel #1
0
 /**
  * Kohana 2.4 introduces a new connection parameter.  If it's not specified, make sure that we
  * define it here to avoid an error later on.
  *
  * @todo: add an upgrade path to modify var/database.php so that we can avoid doing this at
  *        runtime.
  */
 protected function __construct(array $config)
 {
     if (!isset($config["connection"]["params"])) {
         $config["connection"]["params"] = null;
     }
     parent::__construct($config);
 }
Beispiel #2
0
 /**
  * Kohana 2.4 introduces a new connection parameter.  If it's not specified, make sure that we
  * define it here to avoid an error later on.
  *
  * @todo: add an upgrade path to modify var/database.php so that we can avoid doing this at
  *        runtime.
  */
 protected function __construct(array $config)
 {
     if (!isset($config["connection"]["params"])) {
         $config["connection"]["params"] = null;
     }
     parent::__construct($config);
     if (gallery::show_profiler()) {
         $this->config['benchmark'] = true;
     }
 }
 /**
  * Multiway profile of Database configures
  */
 public function __construct()
 {
     $config = array();
     // custom environment key to databse config.
     $environment = Kohana::config('database.environment');
     // available: development, test, pro
     if (!is_array($environment) && !empty($environment)) {
         $config = Kohana::config('database.' . $environment);
     }
     parent::__construct($config);
 }
Beispiel #4
0
 public function __construct($config = array())
 {
     parent::__construct($config);
 }