summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/TypedData/PrimitiveInterface.php
blob: f392ec6f5012b308323044155d16e00e3f3ec2f9 (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
36
37
38
39
<?php

/**
 * @file
 * Contains \Drupal\Core\TypedData\PrimitiveInterface.
 */

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();
}