예제 #1
0
 private function _set_model_connection()
 {
     if (defined($this->model_name . '::connection')) {
         $this->previous_connection_name = ActiveRecord::activeConnectionName();
         $model_name = $this->model_name;
         ActiveRecord::setConnection($model_name::connection);
         return true;
     }
 }
예제 #2
0
 public function connection()
 {
     return ActiveRecord::activeConnectionName();
 }