Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
OpenSpout\Reader\XLSX\Helper\CellValueFormatter Class Reference

Public Member Functions

 __construct (SharedStringsManager $sharedStringsManager, StyleManagerInterface $styleManager, bool $shouldFormatDates, bool $shouldUse1904Dates, XLSX $escaper)
 
 extractAndFormatNodeValue (DOMElement $node)
 Returns the (unescaped) correctly marshalled, cell value associated to the given XML node.
 

Public Attributes

const CELL_TYPE_BOOLEAN = 'b'
 
const CELL_TYPE_DATE = 'd'
 
const CELL_TYPE_ERROR = 'e'
 
const CELL_TYPE_INLINE_STRING = 'inlineStr'
 Definition of all possible cell types.
 
const CELL_TYPE_NUMERIC = 'n'
 
const CELL_TYPE_SHARED_STRING = 's'
 
const CELL_TYPE_STR = 'str'
 
const NUM_SECONDS_IN_ONE_DAY = 86400
 Constants used for date formatting.
 
const XML_ATTRIBUTE_STYLE_ID = 's'
 
const XML_ATTRIBUTE_TYPE = 't'
 Definition of XML attributes used to parse data.
 
const XML_NODE_FORMULA = 'f'
 
const XML_NODE_INLINE_STRING_VALUE = 't'
 
const XML_NODE_VALUE = 'v'
 Definition of XML nodes names used to parse data.
 

Constructor & Destructor Documentation

◆ __construct()

OpenSpout\Reader\XLSX\Helper\CellValueFormatter::__construct ( SharedStringsManager $sharedStringsManager,
StyleManagerInterface $styleManager,
bool $shouldFormatDates,
bool $shouldUse1904Dates,
XLSX $escaper )
Parameters
SharedStringsManager$sharedStringsManagerManages shared strings
StyleManagerInterface$styleManagerManages styles
bool$shouldFormatDatesWhether date/time values should be returned as PHP objects or be formatted as strings
bool$shouldUse1904DatesWhether date/time values should use a calendar starting in 1904 instead of 1900
XLSX$escaperUsed to unescape XML data

The documentation for this class was generated from the following file: