1 | <?php |
||
12 | class ApiTransactionRepository implements TransactionRepositoryInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var ConnectionInterface |
||
16 | */ |
||
17 | private $connection; |
||
18 | |||
19 | /** |
||
20 | * ApiTransactionRepository constructor. |
||
21 | * @param ConnectionInterface $connection |
||
22 | */ |
||
23 | function __construct(ConnectionInterface $connection) |
||
27 | |||
28 | /** |
||
29 | * @param string $id |
||
30 | * @return Transaction |
||
31 | * @throws TransactionException when transaction with the specified ID |
||
32 | * does not exists |
||
33 | */ |
||
34 | public function findById($id) |
||
48 | |||
49 | /** |
||
50 | * @inheritdoc |
||
51 | */ |
||
52 | public function insert($transaction) |
||
56 | |||
57 | /** |
||
58 | * @inheritdoc |
||
59 | */ |
||
60 | public function create($id, $merchant, $parameters) |
||
67 | |||
68 | /** |
||
69 | * @inheritdoc |
||
70 | */ |
||
71 | public function save($transaction) |
||
84 | |||
85 | /** |
||
86 | * @param $data |
||
87 | * @return Transaction |
||
88 | */ |
||
89 | protected function instantiate($data) |
||
102 | } |
||
103 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.