ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
PhpOffice\PhpSpreadsheet\Cell\StringValueBinder Class Reference
+ Inheritance diagram for PhpOffice\PhpSpreadsheet\Cell\StringValueBinder:
+ Collaboration diagram for PhpOffice\PhpSpreadsheet\Cell\StringValueBinder:

Public Member Functions

 bindValue (Cell $cell, $value)
 Bind value to a cell. More...
 

Detailed Description

Definition at line 7 of file StringValueBinder.php.

Member Function Documentation

◆ bindValue()

PhpOffice\PhpSpreadsheet\Cell\StringValueBinder::bindValue ( Cell  $cell,
  $value 
)

Bind value to a cell.

Parameters
Cell$cellCell to bind value to
mixed$valueValue to bind in cell
Returns
bool

Implements PhpOffice\PhpSpreadsheet\Cell\IValueBinder.

Definition at line 17 of file StringValueBinder.php.

References PhpOffice\PhpSpreadsheet\Shared\StringHelper\sanitizeUTF8(), PhpOffice\PhpSpreadsheet\Cell\Cell\setValueExplicit(), and PhpOffice\PhpSpreadsheet\Cell\DataType\TYPE_STRING.

18  {
19  // sanitize UTF-8 strings
20  if (is_string($value)) {
21  $value = StringHelper::sanitizeUTF8($value);
22  }
23 
24  $cell->setValueExplicit((string) $value, DataType::TYPE_STRING);
25 
26  // Done!
27  return true;
28  }
static sanitizeUTF8($value)
Try to sanitize UTF8, stripping invalid byte sequences.
+ Here is the call graph for this function:

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