[ Index ]

PHP Cross Reference of Moodle 310

title

Body

[close]

/lib/spout/src/Spout/Reader/XLSX/Creator/ -> HelperFactory.php (source)

   1  <?php
   2  
   3  namespace Box\Spout\Reader\XLSX\Creator;
   4  
   5  use Box\Spout\Common\Helper\Escaper;
   6  use Box\Spout\Reader\XLSX\Helper\CellValueFormatter;
   7  use Box\Spout\Reader\XLSX\Manager\SharedStringsManager;
   8  use Box\Spout\Reader\XLSX\Manager\StyleManager;
   9  
  10  /**
  11   * Class HelperFactory
  12   * Factory to create helpers
  13   */
  14  class HelperFactory extends \Box\Spout\Common\Creator\HelperFactory
  15  {
  16      /**
  17       * @param SharedStringsManager $sharedStringsManager Manages shared strings
  18       * @param StyleManager $styleManager Manages styles
  19       * @param bool $shouldFormatDates Whether date/time values should be returned as PHP objects or be formatted as strings
  20       * @param bool $shouldUse1904Dates Whether date/time values should use a calendar starting in 1904 instead of 1900
  21       * @return CellValueFormatter
  22       */
  23      public function createCellValueFormatter($sharedStringsManager, $styleManager, $shouldFormatDates, $shouldUse1904Dates)
  24      {
  25          $escaper = $this->createStringsEscaper();
  26  
  27          return new CellValueFormatter($sharedStringsManager, $styleManager, $shouldFormatDates, $shouldUse1904Dates, $escaper);
  28      }
  29  
  30      /**
  31       * @return Escaper\XLSX
  32       */
  33      public function createStringsEscaper()
  34      {
  35          /* @noinspection PhpUnnecessaryFullyQualifiedNameInspection */
  36          return new Escaper\XLSX();
  37      }
  38  }


Generated: Wed Jan 22 11:59:49 2025 Cross-referenced by PHPXref 0.7.1