1 | <?php |
||
11 | class Transaction |
||
12 | { |
||
13 | private $instance; |
||
14 | private $config; |
||
15 | private $formatter; |
||
16 | |||
17 | 10 | public function __construct($instance, TransactionConfig $config) |
|
18 | { |
||
19 | 10 | if (!is_object($instance)) { |
|
20 | 1 | throw new InvalidCallerInstanceException(); |
|
21 | } |
||
22 | |||
23 | 10 | $this->instance = $instance; |
|
24 | 10 | $this->config = $config; |
|
25 | 10 | $this->formatter = new ArgumentsFormatter(); |
|
26 | |||
27 | 10 | if (!extension_loaded('newrelic')) { |
|
28 | throw new NotLoadedNewRelicExtensionException(); |
||
29 | } |
||
30 | 10 | } |
|
31 | |||
32 | public function setFormatter(FormatterInterface $formatter) |
||
33 | { |
||
34 | $this->formatter = $formatter; |
||
35 | } |
||
36 | |||
37 | 9 | public function __call($name, $arguments) |
|
54 | |||
55 | 9 | private function addNewRelicParameter($customParameters) |
|
56 | { |
||
65 | } |
||
66 |