| @@ 113-119 (lines=7) @@ | ||
| 110 | public function __set($name, $value) |
|
| 111 | { |
|
| 112 | //It's a field |
|
| 113 | if (array_key_exists($name, $this->values)) { |
|
| 114 | if ($this->values[$name] !== $value) { |
|
| 115 | $this->changed = true; |
|
| 116 | } |
|
| 117 | ||
| 118 | return $this->values[$name] = $value; |
|
| 119 | } |
|
| 120 | ||
| 121 | //It's a localizable field |
|
| 122 | $language = $this->getDatabase()->getAttribute(SimpleCrud::ATTR_LOCALE); |
|
| @@ 127-133 (lines=7) @@ | ||
| 124 | if (!is_null($language)) { |
|
| 125 | $localeName = "{$name}_{$language}"; |
|
| 126 | ||
| 127 | if (array_key_exists($localeName, $this->values)) { |
|
| 128 | if ($this->values[$localeName] !== $value) { |
|
| 129 | $this->changed = true; |
|
| 130 | } |
|
| 131 | ||
| 132 | return $this->values[$localeName] = $value; |
|
| 133 | } |
|
| 134 | } |
|
| 135 | ||
| 136 | //It's a relation |
|