ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
StringValueBinder.php
Go to the documentation of this file.
1 <?php
2 
4 
6 
8 {
17  public function bindValue(Cell $cell, $value)
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  }
29 }
setValueExplicit($pValue, $pDataType)
Set the value for a cell, with the explicit data type passed to the method (bypassing any use of the ...
Definition: Cell.php:195
static sanitizeUTF8($value)
Try to sanitize UTF8, stripping invalid byte sequences.
bindValue(Cell $cell, $value)
Bind value to a cell.