Remove all __set/__get class variable check

It ultimate failed for the following reason.

If base class is passed on to some other class as object parameter
then accessing protected/private variables will be possible because the
__get method will interfer.
Also __set of protected/private variables is possible.

I rather run check for setting variables without defining them than
haveing open protected/private var access
This commit is contained in:
Clemens Schwaighofer
2020-09-08 11:24:15 +09:00
parent 0ec0007569
commit d5fdb22e93
7 changed files with 86 additions and 143 deletions

View File

@@ -37,13 +37,13 @@ class L10n extends \CoreLibs\Basic
/**
* class constructor call for language getstring
* @param string $lang language name (optional), fallback is en
* @param string $path path, if empty fallback on default internal path
* @param int|integer $set_control_flag control flags for Basic class set/get checks
* @param string $lang language name (optional), fallback is en
* @param string $path path, if empty fallback on default internal path
*/
public function __construct(string $lang = '', string $path = '', int $set_control_flag = 0)
public function __construct(string $lang = '', string $path = ''
)
{
parent::__construct($set_control_flag);
parent::__construct();
if (!$lang) {
$this->lang = 'en';
} else {