function BinaryData::getValue
Same name in other branches
- 8.9.x core/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php \Drupal\Core\TypedData\Plugin\DataType\BinaryData::getValue()
- 10 core/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php \Drupal\Core\TypedData\Plugin\DataType\BinaryData::getValue()
- 11.x core/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php \Drupal\Core\TypedData\Plugin\DataType\BinaryData::getValue()
Overrides PrimitiveBase::getValue
2 calls to BinaryData::getValue()
- BinaryData::getCastedValue in core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ BinaryData.php - Gets the primitive data value casted to the correct PHP type.
- BinaryData::getString in core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ BinaryData.php - Returns a string representation of the data.
File
-
core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ BinaryData.php, line 39
Class
- BinaryData
- The binary data type.
Namespace
Drupal\Core\TypedData\Plugin\DataTypeCode
public function getValue() {
// If the value has been set by (absolute) stream resource URI, access the
// resource now.
if (!isset($this->handle) && isset($this->uri)) {
$this->handle = is_readable($this->uri) ? fopen($this->uri, 'rb') : FALSE;
}
return $this->handle;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.