1 | <?php |
||
2 | namespace Mezon\PdoCrud; |
||
3 | |||
4 | use Mezon\Conf\Conf; |
||
5 | |||
6 | /** |
||
7 | * Class ConnectionTrait |
||
8 | * |
||
9 | * @package Mezon |
||
10 | * @subpackage PdoCrud |
||
11 | * @author Dodonov A.A. |
||
12 | * @version v.1.0 (2020/02/19) |
||
13 | * @copyright Copyright (c) 2020, aeon.org |
||
14 | */ |
||
15 | |||
16 | /** |
||
17 | * Trait for getting appropriate connection |
||
18 | */ |
||
19 | trait ApropriateConnectionTrait |
||
20 | { |
||
21 | use ConnectionTrait; |
||
22 | |||
23 | /** |
||
24 | * Method returns appropriate connections |
||
25 | * |
||
26 | * @return PdoCrud connection |
||
27 | */ |
||
28 | public function getApropriateConnection(): PdoCrud |
||
29 | { |
||
30 | return $this->getConnection([ |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
31 | 'default-db-connection' |
||
32 | ]); |
||
33 | } |
||
34 | } |
||
35 |