I have class
in php
and I need to modify the value of private $key = "valor";
out of class
.
How can I change the value of $key
outside 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 could not find a way to set this value out of class Webcmd
and now I also can not set a value that is being passed via POST
.
How can I do this?