public function __contruct($pm) { $this->{$paymentMethod} = $pm; parent::__contruct('This payment method id is knowned'); }