Newer
Older
Dries Buytaert
committed
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
/**
* @file
* Definition of Drupal\Core\TypedData\TypedDataInterface.
*/
namespace Drupal\Core\TypedData;
use Drupal\user;
/**
* Interface for typed data objects.
*/
interface TypedDataInterface {
/**
* Gets the data type.
*
* @return string
* The data type of the wrapped data.
*/
public function getType();
/**
* Gets the data definition.
*
* @return array
* The data definition array.
*/
public function getDefinition();
/**
* Gets the data value.
*
* @return mixed
*/
public function getValue();
/**
* Sets the data value.
*
* @param mixed $value
* The value to set in the format as documented for the data type or NULL to
* unset the data value.
*
* @throws \Drupal\Core\TypedData\ReadOnlyException
* If the data is read-only.
*/
public function setValue($value);
/**
* Returns a string representation of the data.
*
* @return string
*/
public function getString();
/**
* Validates the currently set data value.
*/
public function validate();
}