| 1 | <?php |
||
| 10 | abstract class AbstractPayment |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var array |
||
| 14 | */ |
||
| 15 | protected $params = array(); |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Class constructor |
||
| 19 | * |
||
| 20 | * @param array $params |
||
| 21 | */ |
||
| 22 | public function __construct(array $params = array()) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Configure params |
||
| 40 | * |
||
| 41 | * @return array |
||
| 42 | */ |
||
| 43 | abstract protected function getRequiredParams(); |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return array |
||
| 47 | */ |
||
| 48 | public function toArray() |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Setter |
||
| 55 | * |
||
| 56 | * @param string $key |
||
| 57 | * @param mixed $val |
||
| 58 | * @return self |
||
| 59 | */ |
||
| 60 | public function set($key, $val) |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Getter |
||
| 69 | * |
||
| 70 | * @param string $key |
||
| 71 | * @param mixed $default |
||
| 72 | * @return mixed |
||
| 73 | */ |
||
| 74 | public function get($key, $default = null) |
||
| 82 | } |