public function BinaryData::getString in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php \Drupal\Core\TypedData\Plugin\DataType\BinaryData::getString()
Returns a string representation of the data.
Return value
string
Overrides TypedData::getString
File
- core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ BinaryData.php, line 81 - Contains \Drupal\Core\TypedData\Plugin\DataType\BinaryData.
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;
}