| @@ 55-61 (lines=7) @@ | ||
| 52 | * @param string $argument |
|
| 53 | * @param mixed $value |
|
| 54 | */ |
|
| 55 | public function __set($argument, $value) |
|
| 56 | { |
|
| 57 | $setter = 'set' . str_replace('_', '', $argument); |
|
| 58 | if (is_callable([$this, $setter])) { |
|
| 59 | call_user_func([$this, $setter], $value); |
|
| 60 | } |
|
| 61 | } |
|
| 62 | ||
| 63 | /** |
|
| 64 | * Get a query argument. |
|
| @@ 70-78 (lines=9) @@ | ||
| 67 | * |
|
| 68 | * @return mixed |
|
| 69 | */ |
|
| 70 | public function __get($argument) |
|
| 71 | { |
|
| 72 | $getter = 'get' . str_replace('_', '', $argument); |
|
| 73 | if (is_callable([$this, $getter])) { |
|
| 74 | return call_user_func([$this, $getter]); |
|
| 75 | } |
|
| 76 | ||
| 77 | return null; |
|
| 78 | } |
|
| 79 | ||
| 80 | /** |
|
| 81 | * Test if a query argument is NULL. |
|