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.

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

   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  }