Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.
   1  <?php
   2  
   3  declare(strict_types=1);
   4  
   5  namespace OpenSpout\Writer\Common\Manager;
   6  
   7  use OpenSpout\Common\Entity\Row;
   8  use OpenSpout\Writer\Common\Entity\Worksheet;
   9  
  10  /**
  11   * @internal
  12   */
  13  interface WorksheetManagerInterface
  14  {
  15      /**
  16       * Adds a row to the worksheet.
  17       *
  18       * @param Worksheet $worksheet The worksheet to add the row to
  19       * @param Row       $row       The row to be added
  20       *
  21       * @throws \OpenSpout\Common\Exception\IOException              If the data cannot be written
  22       * @throws \OpenSpout\Common\Exception\InvalidArgumentException If a cell value's type is not supported
  23       */
  24      public function addRow(Worksheet $worksheet, Row $row): void;
  25  
  26      /**
  27       * Prepares the worksheet to accept data.
  28       *
  29       * @param Worksheet $worksheet The worksheet to start
  30       *
  31       * @throws \OpenSpout\Common\Exception\IOException If the sheet data file cannot be opened for writing
  32       */
  33      public function startSheet(Worksheet $worksheet): void;
  34  
  35      /**
  36       * Closes the worksheet.
  37       */
  38      public function close(Worksheet $worksheet): void;
  39  }