1 | <?php |
||
17 | final class Client implements ClientInterface |
||
18 | { |
||
19 | /** |
||
20 | * @var ConnectionInterface |
||
21 | */ |
||
22 | private $connection; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | private $token; |
||
28 | |||
29 | /** |
||
30 | * Initialize Piwik client. |
||
31 | * |
||
32 | * @param ConnectionInterface $connection Piwik active connection |
||
33 | * @param string $token auth token |
||
34 | */ |
||
35 | public function __construct(ConnectionInterface $connection, string $token = 'anonymous') |
||
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | public function setToken(string $token): void |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | public function call(string $method, array $params = [], $format = 'php') |
||
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | public function getConnection(): ConnectionInterface |
||
79 | } |
||
80 |