1 | <?php |
||
16 | class AuraSqlConnectionInterceptor implements MethodInterceptor |
||
17 | { |
||
18 | const PROP = 'pdo'; |
||
19 | |||
20 | /** |
||
21 | * @var ConnectionLocatorInterface |
||
22 | */ |
||
23 | private $connectionLocator; |
||
24 | |||
25 | /** |
||
26 | * @var string[] |
||
27 | */ |
||
28 | private $readsMethods = []; |
||
29 | |||
30 | /** |
||
31 | * @var string[] |
||
32 | */ |
||
33 | private $writeMethods = []; |
||
34 | |||
35 | /** |
||
36 | * @Read("readMethods") |
||
37 | * @Write("writeMethods") |
||
38 | */ |
||
39 | 3 | public function __construct(ConnectionLocatorInterface $connectionLocator, array $readMethods, array $writeMethods) |
|
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | 1 | public function invoke(MethodInvocation $invocation) |
|
59 | |||
60 | 1 | private function getConnection(MethodInvocation $invocation) : ExtendedPdoInterface |
|
69 | } |
||
70 |