コード例 #1
0
ファイル: Loader.php プロジェクト: railsphp/framework
 public function loadEnvironmentConfig($environment)
 {
     $file = $this->app->config()['paths']['config']->expand('environments', $environment . '.php');
     if (!is_file($file)) {
         throw new \InvalidArgumentException(sprintf("Configuration file for environment '%s' not found: %s", $environment, $file));
     }
     $configurer = (require $file);
     $configurer($this->app->config());
     if ($this->connectionManagerSetUp) {
         PersistedModel::connectionManager()->setDefaultConnection($environment);
     }
 }
コード例 #2
0
ファイル: Base.php プロジェクト: railsphp/framework
 protected function deleteOrDestroy(array $options = [])
 {
     return $this->transaction(function () use($options) {
         return parent::deleteOrDestroy($options);
     });
 }