2
I have a class in the php and need to modify the value of private $key = "valor"; out of class.
How can I change the value of $key out of this class? The value I want to put in $key comes from a $_POST["name"].
class Webcmd {
private $key = "valor padrão a ser modificado";
function __construct(){}
...
}
I couldn’t find a way to define that value outside the class Webcmd and now I can’t either set a value that is being passed via POST.
How can I do that?
Tried to create a Setter?
– rray
No, I don’t usually wear
class. I tried some "things" I found researching, but none worked.– Florida