Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.
   1  <?php
   2  
   3  namespace Box\Spout\Writer\Common\Manager;
   4  
   5  use Box\Spout\Common\Entity\Row;
   6  use Box\Spout\Writer\Common\Entity\Worksheet;
   7  
   8  /**
   9   * Interface WorksheetManagerInterface
  10   * Inteface for worksheet managers, providing the generic interfaces to work with worksheets.
  11   */
  12  interface WorksheetManagerInterface
  13  {
  14      /**
  15       * Adds a row to the worksheet.
  16       *
  17       * @param Worksheet $worksheet The worksheet to add the row to
  18       * @param Row $row The row to be added
  19       * @throws \Box\Spout\Common\Exception\IOException If the data cannot be written
  20       * @throws \Box\Spout\Common\Exception\InvalidArgumentException If a cell value's type is not supported
  21       * @return void
  22       */
  23      public function addRow(Worksheet $worksheet, Row $row);
  24  
  25      /**
  26       * Prepares the worksheet to accept data
  27       *
  28       * @param Worksheet $worksheet The worksheet to start
  29       * @throws \Box\Spout\Common\Exception\IOException If the sheet data file cannot be opened for writing
  30       * @return void
  31       */
  32      public function startSheet(Worksheet $worksheet);
  33  
  34      /**
  35       * Closes the worksheet
  36       *
  37       * @param Worksheet $worksheet
  38       * @return void
  39       */
  40      public function close(Worksheet $worksheet);
  41  }