Welcome Guest, Not a member yet? Register   Sign In
why i can access "protected property of model" in controller directly in codeigniter4
#2

That’s because of the “magic” __get() function that return the property if it exists:

PHP Code:
if (property_exists($this$name))
{
    return 
$this->{$name};

CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
RE: why i can access "protected property of model" in controller directly in codeigniter4 - by includebeer - 03-22-2020, 07:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB