Jump to content

What is this?


MuseiKaze

Recommended Posts

Sorry I wasnt sure what section to post this in. But Ive been looking all around and I havnt been able to find anything about this on tutorial sites and typing it in google produces no results. But I was just wondering what " -> " this is called and what it does?

 

Eg "$params->Data = $texttofax . $finalitems;"

 

I know its probably a simple question but I cant find a thing on it. Thanks.

Link to comment
https://forums.phpfreaks.com/topic/190392-what-is-this/
Share on other sites

its the class assignment operator...

 

in this case you have an instance of a class $params and you are setting a property 'Data' though these things should not be publically available for setting...

 

it would be better to have $params->setData($texttofax . $finalitems); - this way you have control wiithin the object itself over the setting of that parameter by only allowing this publioc method to set what should be a private paramater

Link to comment
https://forums.phpfreaks.com/topic/190392-what-is-this/#findComment-1004351
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.