fork download
  1. <?php
  2.  
  3. class CheckRenew
  4. {
  5. public $zip;
  6. public $email;
  7. public $addressNumber;
  8. protected $custom2Id;
  9. public function __construct($info)
  10. {
  11. foreach($info as $key => $value)
  12. {
  13. $this->$key = $value;
  14. }
  15. }
  16. }
  17.  
  18.  
  19. $subscription = new CheckRenew([
  20. 'custom2Id' => 13,
  21. 'email' => 'someemail@email.com',
  22. 'zip' => '90530000',
  23. 'addressNumber' => '1234',
  24. 'all' => true
  25. ]);
  26.  
  27.  
  28. var_dump($subscription->all);
  29.  
Success #stdin #stdout 0s 52488KB
stdin
Standard input is empty
stdout
bool(true)