| @@ 182-188 (lines=7) @@ | ||
| 179 | */ |
|
| 180 | public function __call($method, $args) |
|
| 181 | { |
|
| 182 | if (substr($method, 0, 3) == 'set') { |
|
| 183 | $field = strtolower(substr($method, 3)); |
|
| 184 | if (in_array($field, $this->ogoneFields)) { |
|
| 185 | $this->parameters[$field] = $args[0]; |
|
| 186 | return; |
|
| 187 | } |
|
| 188 | } |
|
| 189 | ||
| 190 | if (substr($method, 0, 3) == 'get') { |
|
| 191 | $field = strtolower(substr($method, 3)); |
|
| @@ 190-195 (lines=6) @@ | ||
| 187 | } |
|
| 188 | } |
|
| 189 | ||
| 190 | if (substr($method, 0, 3) == 'get') { |
|
| 191 | $field = strtolower(substr($method, 3)); |
|
| 192 | if (array_key_exists($field, $this->parameters)) { |
|
| 193 | return $this->parameters[$field]; |
|
| 194 | } |
|
| 195 | } |
|
| 196 | ||
| 197 | throw new BadMethodCallException("Unknown method $method"); |
|
| 198 | } |
|