Welcome Guest, Not a member yet? Register   Sign In
How use __set in driver class?
#1

Hi
I need to use __set in my driver class (parent)
because i want to add field to my class and i cannot do it
So i have to use method instead of properties
And when i use __set,error :
Message: Undefined property: Sms::$parsgreen
Reply
#2

__set aren't a function you call by yourself. It's automatically invoked when you set an value to a Class.

$driver = new MyCoolDriver();
$driver->variable = 'My cool value';

$driver->variable will now invoke __set.
Reply
#3

(01-26-2020, 12:04 PM)jreklund Wrote: __set aren't a function you call by yourself. It's automatically invoked when you set an value to a Class.

$driver = new MyCoolDriver();
$driver->variable = 'My cool value';

$driver->variable will now invoke __set.

Thank you it is solving now
Reply




Theme © iAndrew 2016 - Forum software by © MyBB