summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/TypedData/PrimitiveInterface.php
blob: 1df50f78dc4447afdb2a9b90839a81f6b2ed1847 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php

namespace Drupal\Core\TypedData;

/**
 * Interface for primitive data.
 *
 * @ingroup typed_data
 */
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();

}