code: protected function createModels($rows)
      {
          if ($this->asArray) {
              return $rows;
          } else {
              $models = [];
              /* @var $class ActiveRecord */
              $class = $this->modelClass;
              foreach ($rows as $row) {
                  $model = $class::instantiate($row);
                  $modelClass = get_class($model);
                  $modelClass::populateRecord($model, $row);
                  $models[] = $model;
              }
              return $models;
          }
      }
docs: Converts found rows into model instances.
  @param array $rows
  @return array|ActiveRecord[]
  @since 2.0.11