diff --git a/com_oauthserver/administrator/src/Table/PropertyManagerTrait.php b/com_oauthserver/administrator/src/Table/PropertyManagerTrait.php new file mode 100644 index 0000000..92a1c92 --- /dev/null +++ b/com_oauthserver/administrator/src/Table/PropertyManagerTrait.php @@ -0,0 +1,47 @@ +$name)) { + return $name; + } + + return null; + } + + public function __set($name, $value) + { + // All protected properties names must start with _ + if (str_starts_with($name, '_')) { + return; + } + + // If class has setter for property + $setterName = 'set' . CasesHelper::camelize($name, true); + if (method_exists($this, $setterName)) { + call_user_func([$this, $setterName], $value); + return; + } + + if (isset($this->$name)) { + $this->$name = $value; + } + } +} \ No newline at end of file