function BinaryData::getString
Same name in other branches
- 9 core/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php \Drupal\Core\TypedData\Plugin\DataType\BinaryData::getString()
- 10 core/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php \Drupal\Core\TypedData\Plugin\DataType\BinaryData::getString()
- 11.x core/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php \Drupal\Core\TypedData\Plugin\DataType\BinaryData::getString()
Overrides TypedData::getString
File
-
core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ BinaryData.php, line 76
Class
- BinaryData
- The binary data type.
Namespace
Drupal\Core\TypedData\Plugin\DataTypeCode
public function getString() {
// Return the file content.
$contents = '';
while (!feof($this->getValue())) {
$contents .= fread($this->handle, 8192);
}
return $contents;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.