1 | <?php |
||
9 | class PolymorphicForeignKey extends ForeignKey implements CompositeDBField { |
||
10 | |||
11 | /** |
||
12 | * @var boolean $isChanged |
||
13 | */ |
||
14 | protected $isChanged = false; |
||
15 | |||
16 | /** |
||
17 | * Value of relation class |
||
18 | * |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $classValue = null; |
||
22 | |||
23 | /** |
||
24 | * Field definition cache for compositeDatabaseFields |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | protected static $classname_spec_cache = array(); |
||
29 | |||
30 | /** |
||
31 | * Clear all cached classname specs. It's necessary to clear all cached subclassed names |
||
32 | * for any classes if a new class manifest is generated. |
||
33 | */ |
||
34 | public static function clear_classname_spec_cache() { |
||
37 | |||
38 | public function scaffoldFormField($title = null, $params = null) { |
||
44 | |||
45 | public function requireField() { |
||
51 | |||
52 | public function writeToManipulation(&$manipulation) { |
||
63 | |||
64 | public function addToQuery(&$query) { |
||
75 | |||
76 | /** |
||
77 | * Get the value of the "Class" this key points to |
||
78 | * |
||
79 | * @return string Name of a subclass of DataObject |
||
80 | */ |
||
81 | public function getClassValue() { |
||
84 | |||
85 | /** |
||
86 | * Set the value of the "Class" this key points to |
||
87 | * |
||
88 | * @param string $class Name of a subclass of DataObject |
||
89 | * @param boolean $markChanged Mark this field as changed? |
||
90 | */ |
||
91 | public function setClassValue($class, $markChanged = true) { |
||
95 | |||
96 | /** |
||
97 | * Gets the value of the "ID" this key points to |
||
98 | * |
||
99 | * @return integer |
||
100 | */ |
||
101 | public function getIDValue() { |
||
104 | |||
105 | /** |
||
106 | * Sets the value of the "ID" this key points to |
||
107 | * |
||
108 | * @param integer $id |
||
109 | * @param boolean $markChanged Mark this field as changed? |
||
110 | */ |
||
111 | public function setIDValue($id, $markChanged = true) { |
||
115 | |||
116 | public function setValue($value, $record = null, $markChanged = true) { |
||
149 | |||
150 | public function getValue() { |
||
155 | |||
156 | public function compositeDatabaseFields() { |
||
185 | |||
186 | public function isChanged() { |
||
189 | |||
190 | public function exists() { |
||
193 | |||
194 | public function scalarValueOnly() |
||
198 | } |
||
199 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..