function PrimitiveInterface::getCastedValue

Gets the primitive data value casted to the correct PHP type.

Return value

mixed The primitive data value cast to the correct PHP type.

5 methods override PrimitiveInterface::getCastedValue()
BinaryData::getCastedValue in core/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php
Gets the primitive data value casted to the correct PHP type.
BooleanData::getCastedValue in core/lib/Drupal/Core/TypedData/Plugin/DataType/BooleanData.php
#[JsonSchema([ 'type' => 'boolean', ])]
FloatData::getCastedValue in core/lib/Drupal/Core/TypedData/Plugin/DataType/FloatData.php
#[JsonSchema([ 'type' => 'number', ])]
IntegerData::getCastedValue in core/lib/Drupal/Core/TypedData/Plugin/DataType/IntegerData.php
#[JsonSchema([ 'type' => 'integer', ])]
StringData::getCastedValue in core/lib/Drupal/Core/TypedData/Plugin/DataType/StringData.php
#[JsonSchema([ 'type' => 'string', ])]

File

core/lib/Drupal/Core/TypedData/PrimitiveInterface.php, line 35

Class

PrimitiveInterface
Interface for primitive data.

Namespace

Drupal\Core\TypedData

Code

public function getCastedValue();

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.