@@ 63-70 (lines=8) @@ | ||
60 | $getter = 'get'.ucfirst($property); |
|
61 | ||
62 | $pos = strpos($property, '_'); |
|
63 | if (!method_exists($this, $getter) && $pos !== false) { |
|
64 | $locale = strtolower(substr($property, $pos + 1)); |
|
65 | $property = substr($property, 0, -3); |
|
66 | ||
67 | if ($this->check($locale)) { |
|
68 | return $this->getVariableByLocale($property, $this->getLocaleVar($locale)); |
|
69 | } |
|
70 | } |
|
71 | ||
72 | return $this->{$getter}(); |
|
73 | } |
|
@@ 80-87 (lines=8) @@ | ||
77 | $pos = strpos($property, '_'); |
|
78 | $setter = 'set'.ucfirst($property); |
|
79 | ||
80 | if (!method_exists($this, $setter) && $pos !== false) { |
|
81 | $locale = strtolower(substr($property, $pos + 1)); |
|
82 | $property = substr($property, 0, -3); |
|
83 | ||
84 | if ($this->check($locale)) { |
|
85 | Sludio::updateTranslations(get_class($this), $this->getLocaleVar($locale), $property, $value, $this->getId()); |
|
86 | } |
|
87 | } |
|
88 | $this->{$property} = $value; |
|
89 | ||
90 | return $this; |