function BinaryData::getString
Overrides TypedData::getString
File
-
core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ BinaryData.php, line 77
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.