function BinaryData::getValue

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php \Drupal\Core\TypedData\Plugin\DataType\BinaryData::getValue()
  2. 10 core/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php \Drupal\Core\TypedData\Plugin\DataType\BinaryData::getValue()
  3. 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\DataType

Code

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.