components/DbFixtureManager.php
public function getDbConnection()
  {
    if (is_string($this->db)) {
      $this->db = Yii::$app->get($this->db);
    }
    if (!$this->db instanceof Connection) {
      throw new Exception("The 'db' option must refer to the application component ID of a DB connection.");
    }
    return $this->db;
  }
public function getDbConnection()
  {
    if (is_string($this->db)) {
      $this->db = Yii::$app->get($this->db);
    }
    if (!$this->db instanceof Connection) {
      throw new Exception("The 'db' option must refer to the application component ID of a DB connection.");
    }
    return $this->db;
  }
public function getDbConnection ( ) { if ( is_string ( $ this -> db ) ) { $ this -> db = Yii :: $ app -> get ( $ this -> db ) ; } if ( ! $ this -> db instanceof Connection ) { throw new Exception ( "The 'db' option must refer to the application component ID of a DB connection." ) ; } return $ this -> db ; }
Returns the database connection used to load fixtures.
@throws Exception if {@link db} application component is invalid
@return DbConnection the database connection
Returns the database connection used to load fixtures .