PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.4.8
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.4.8
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
visualizer / vendor / phpoffice / phpspreadsheet / src / PhpSpreadsheet / Cell / StringValueBinder.php

StringValueBinder.php in Visualizer – Tables & Charts Manager with Built-in AI Generator 3.4.8, at vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/StringValueBinder.php

32 lines 694 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace PhpOffice\PhpSpreadsheet\Cell;
4
5 use PhpOffice\PhpSpreadsheet\Shared\StringHelper;
6
7 class StringValueBinder implements IValueBinder
8 {
9 /**
10 * Bind value to a cell.
11 *
12 * @param Cell $cell Cell to bind value to
13 * @param mixed $value Value to bind in cell
14 *
15 * @throws \PhpOffice\PhpSpreadsheet\Exception
16 *
17 * @return bool
18 */
19 public function bindValue(Cell $cell, $value)
20 {
21 // sanitize UTF-8 strings
22 if (is_string($value)) {
23 $value = StringHelper::sanitizeUTF8($value);
24 }
25
26 $cell->setValueExplicit((string) $value, DataType::TYPE_STRING);
27
28 // Done!
29 return true;
30 }
31 }
32