Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.
   1  <?php
   2  
   3  namespace Box\Spout\Reader;
   4  
   5  /**
   6   * Interface ReaderInterface
   7   */
   8  interface ReaderInterface
   9  {
  10      /**
  11       * Prepares the reader to read the given file. It also makes sure
  12       * that the file exists and is readable.
  13       *
  14       * @param  string $filePath Path of the file to be read
  15       * @throws \Box\Spout\Common\Exception\IOException
  16       * @return void
  17       */
  18      public function open($filePath);
  19  
  20      /**
  21       * Returns an iterator to iterate over sheets.
  22       *
  23       * @throws \Box\Spout\Reader\Exception\ReaderNotOpenedException If called before opening the reader
  24       * @return \Iterator To iterate over sheets
  25       */
  26      public function getSheetIterator();
  27  
  28      /**
  29       * Closes the reader, preventing any additional reading
  30       *
  31       * @return void
  32       */
  33      public function close();
  34  }