i got one class and i'm trying to implement it into my website, but i'm unable to pass variable into it...
class Order {
var $totalPrice = null;
function load() {
$this->totalPrice = 123;
}
function loadByPaymentSessionId($paymentSessionId) {
$this->totalPrice = 123;
}
}
$order = new Order();
$order->load();
How can i set $this->totalPrice outside of class?