1 | <?php |
||
14 | class SWLPropertyChange { |
||
15 | |||
16 | const TYPE_INSERT = 0; |
||
17 | const TYPE_UPDATE = 1; |
||
18 | const TYPE_DELETE = 2; |
||
19 | |||
20 | /** |
||
21 | * The old value. |
||
22 | * |
||
23 | * @var SMWDataItem or null |
||
24 | */ |
||
25 | private $oldValue; |
||
26 | |||
27 | /** |
||
28 | * The new value. |
||
29 | * |
||
30 | * @var SMWDataItem or null |
||
31 | */ |
||
32 | private $newValue; |
||
33 | |||
34 | /** |
||
35 | * Creates and returns a new SWLPropertyChange instance from a serialization. |
||
36 | * |
||
37 | * @param string|null $oldValue |
||
38 | * @param string|null $newValue |
||
39 | * |
||
40 | * @return SWLPropertyChange |
||
41 | */ |
||
42 | public static function newFromSerialization( SMWDIProperty $property, $oldValue, $newValue ) { |
||
50 | |||
51 | /** |
||
52 | * Create a new SWLPropertyChange. |
||
53 | * |
||
54 | * @param SMWDataItem $oldValue |
||
55 | * @param SMWDataItem $newValue |
||
56 | */ |
||
57 | public function __construct( /* SMWDataItem */ $oldValue, /* SMWDataItem */ $newValue ) { |
||
61 | |||
62 | /** |
||
63 | * Returns the old value, or null if there is none. |
||
64 | * |
||
65 | * @return SMWDataItem or null |
||
66 | */ |
||
67 | public function getOldValue() { |
||
70 | |||
71 | |||
72 | /** |
||
73 | * returns the new value, or null if there is none. |
||
74 | * |
||
75 | * @return SMWDataItem or null |
||
76 | */ |
||
77 | public function getNewValue() { |
||
80 | |||
81 | /** |
||
82 | * Returns the type of the change. |
||
83 | * |
||
84 | * @return element of the SWLPropertyChange::TYPE_ enum |
||
85 | */ |
||
86 | public function getType() { |
||
97 | |||
98 | /** |
||
99 | * Returns a serialized version of the change, suitable to |
||
100 | * do equal comparisions but not to unserialize. |
||
101 | * |
||
102 | * @return string |
||
103 | */ |
||
104 | public function getSerialization() { |
||
108 | |||
109 | } |
||
110 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.