GloBee-Official /
payment-api-php
| 1 | <?php |
||
| 2 | |||
| 3 | namespace GloBee\PaymentApi\Models; |
||
| 4 | |||
| 5 | use GloBee\PaymentApi\Exceptions\UnknownPropertyException; |
||
| 6 | |||
| 7 | abstract class Model |
||
| 8 | { |
||
| 9 | /** |
||
|
0 ignored issues
–
show
Coding Style
Documentation
introduced
by
Loading history...
|
|||
| 10 | * @param $name |
||
|
0 ignored issues
–
show
|
|||
| 11 | * |
||
| 12 | * @return mixed |
||
| 13 | * @throws UnknownPropertyException |
||
|
0 ignored issues
–
show
|
|||
| 14 | */ |
||
| 15 | 15 | public function __get($name) |
|
|
0 ignored issues
–
show
|
|||
| 16 | { |
||
| 17 | 15 | if (property_exists($this, $name)) { |
|
| 18 | 14 | return $this->{$name}; |
|
| 19 | } |
||
| 20 | |||
| 21 | 1 | throw new UnknownPropertyException($name); |
|
| 22 | } |
||
| 23 | } |
||
| 24 |