Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 39 and 311]

   1  <?php
   2  
   3  namespace Box\Spout\Writer\Common\Entity;
   4  
   5  /**
   6   * Class Workbook
   7   * Entity describing a workbook
   8   */
   9  class Workbook
  10  {
  11      /** @var Worksheet[] List of the workbook's sheets */
  12      private $worksheets = [];
  13  
  14      /** @var string Timestamp based unique ID identifying the workbook */
  15      private $internalId;
  16  
  17      /**
  18       * Workbook constructor.
  19       */
  20      public function __construct()
  21      {
  22          $this->internalId = \uniqid();
  23      }
  24  
  25      /**
  26       * @return Worksheet[]
  27       */
  28      public function getWorksheets()
  29      {
  30          return $this->worksheets;
  31      }
  32  
  33      /**
  34       * @param Worksheet[] $worksheets
  35       */
  36      public function setWorksheets($worksheets)
  37      {
  38          $this->worksheets = $worksheets;
  39      }
  40  
  41      /**
  42       * @return string
  43       */
  44      public function getInternalId()
  45      {
  46          return $this->internalId;
  47      }
  48  }