-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathIAnalyticsDriver.php
More file actions
89 lines (78 loc) · 1.86 KB
/
IAnalyticsDriver.php
File metadata and controls
89 lines (78 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php declare(strict_types = 1);
namespace Dms\Package\Analytics;
use Dms\Common\Structure\Web\Html;
use Dms\Core\Form\Object\FormObject;
use Psr\Cache\CacheItemPoolInterface;
/**
* The analytics driver interface.
*
* @author Elliot Levin <elliotlevin@hotmail.com>
*/
interface IAnalyticsDriver
{
/**
* Gets the name.
*
* @return string
*/
public function getName() : string;
/**
* Gets the label.
*
* @return string
*/
public function getLabel() : string;
/**
* Gets the installation instructions.
*
* @return Html
*/
public function getInstallationInstructions() : Html;
/**
* Gets the cache.
*
* @return CacheItemPoolInterface
*/
public function getCache() : CacheItemPoolInterface;
/**
* Sets the cache.
*
* @param CacheItemPoolInterface $cache
*
* @return void
*/
public function setCache(CacheItemPoolInterface $cache);
/**
* Gets the options form for the providing the required data
* to connect with the analytics API.
*
* @return FormObject
*/
public function getOptionsForm() : FormObject;
/**
* Validates the supplied credentials for the analytics API
* are correct.
*
* @param FormObject $options
*
* @return bool
*/
public function validate(FormObject $options) : bool;
/**
* Gets the available analytics data sources for the supplied
* form data.
*
* @param FormObject $options
*
* @return IAnalyticsData
*/
public function getAnalyticsData(FormObject $options) : IAnalyticsData;
/**
* Gets the embed code to be displayed on the frontend of the website.
*
* @param FormObject $options
*
* @return string
*/
public function getEmbedCode(FormObject $options) : string;
}