Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/TypedData/PrimitiveInterface.php \Drupal\Core\TypedData\PrimitiveInterface
  2. 9 core/lib/Drupal/Core/TypedData/PrimitiveInterface.php \Drupal\Core\TypedData\PrimitiveInterface

Interface for primitive data.

Hierarchy

Expanded class hierarchy of PrimitiveInterface

All classes that implement PrimitiveInterface

Related topics

9 files declare their use of PrimitiveInterface
AllowedValuesConstraintValidator.php in core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php
BinaryInterface.php in core/lib/Drupal/Core/TypedData/Type/BinaryInterface.php
BooleanInterface.php in core/lib/Drupal/Core/TypedData/Type/BooleanInterface.php
DecimalInterface.php in core/lib/Drupal/Core/TypedData/Type/DecimalInterface.php
FloatInterface.php in core/lib/Drupal/Core/TypedData/Type/FloatInterface.php

... See full list

File

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

Namespace

Drupal\Core\TypedData
View source
interface PrimitiveInterface {

  /**
   * Gets the primitive data value.
   *
   * @return mixed
   */
  public function getValue();

  /**
   * Sets the primitive data value.
   *
   * @param mixed|null $value
   *   The value to set in the format as documented for the data type or NULL to
   *   unset the data value.
   */
  public function setValue($value);

  /**
   * Gets the primitive data value casted to the correct PHP type.
   *
   * @return mixed
   */
  public function getCastedValue();

}

Members

Namesort descending Modifiers Type Description Overrides
PrimitiveInterface::getCastedValue public function Gets the primitive data value casted to the correct PHP type.
PrimitiveInterface::getValue public function Gets the primitive data value.
PrimitiveInterface::setValue public function Sets the primitive data value.