You are here

public function SpreadsheetIterator::getRowsCount in Migrate Spreadsheet 8

Same name and namespace in other branches
  1. 2.0.x src/SpreadsheetIterator.php \Drupal\migrate_spreadsheet\SpreadsheetIterator::getRowsCount()

Gets the total number of rows in the worksheet.

Return value

int The total number of rows in the worksheet.

Overrides SpreadsheetIteratorInterface::getRowsCount

2 calls to SpreadsheetIterator::getRowsCount()
SpreadsheetIterator::getOrigin in src/SpreadsheetIterator.php
Retrieves the top-left origin of data area.
SpreadsheetIterator::valid in src/SpreadsheetIterator.php

File

src/SpreadsheetIterator.php, line 281

Class

SpreadsheetIterator
Provides a spreadsheet iterator.

Namespace

Drupal\migrate_spreadsheet

Code

public function getRowsCount() {
  if (!isset($this->cache['rows_count'])) {
    $this->cache['rows_count'] = $this
      ->getWorksheet()
      ->getHighestDataRow();
  }
  return $this->cache['rows_count'];
}