<?php
class CheckRenew
{
public $zip;
public $email;
public $addressNumber;
protected $custom2Id;
public function __construct($info)
{
foreach($info as $key => $value)
{
$this->$key = $value;
}
}
}
$subscription = new CheckRenew([
'custom2Id' => 13,
'email' => 'someemail@email.com',
'zip' => '90530000',
'addressNumber' => '1234'
]);
PD9waHAKCmNsYXNzIENoZWNrUmVuZXcKewogICAgcHVibGljICR6aXA7CiAgICBwdWJsaWMgJGVtYWlsOwogICAgcHVibGljICRhZGRyZXNzTnVtYmVyOwogICAgcHJvdGVjdGVkICRjdXN0b20ySWQ7IAogICAgcHVibGljIGZ1bmN0aW9uIF9fY29uc3RydWN0KCRpbmZvKQogICAgewogICAgICAgIGZvcmVhY2goJGluZm8gYXMgJGtleSA9PiAkdmFsdWUpCiAgICAgICAgewogICAgICAgIAkkdGhpcy0+JGtleSA9ICR2YWx1ZTsKICAgICAgICB9CiAgICB9Cn0KCgokc3Vic2NyaXB0aW9uID0gbmV3IENoZWNrUmVuZXcoWwogICAgJ2N1c3RvbTJJZCcgPT4gMTMsCiAgICAnZW1haWwnICAgICAgID0+ICdzb21lZW1haWxAZW1haWwuY29tJywKICAgICd6aXAnICAgICAgICAgPT4gJzkwNTMwMDAwJywKICAgICdhZGRyZXNzTnVtYmVyJyA9PiAnMTIzNCcgCl0pOwoKCnZhcl9kdW1wKCRzdWJzY3JpcHRpb24pOw==