1 | <?php |
||
3 | class GoogleAnalyticsSTE extends Extension |
||
|
|||
4 | { |
||
5 | |||
6 | /** |
||
7 | * |
||
8 | * @return String |
||
9 | */ |
||
10 | private static $main_code; |
||
11 | |||
12 | /** |
||
13 | * |
||
14 | * @return String |
||
15 | */ |
||
16 | private static $site_name; |
||
17 | |||
18 | /** |
||
19 | * |
||
20 | * @return String |
||
21 | */ |
||
22 | private static $show_really_annoying_yellow_bar = false; |
||
23 | |||
24 | public function GAMainIsOn() |
||
25 | { |
||
26 | return Director::isLive() || isset($_GET['testanalytics']); |
||
27 | } |
||
28 | |||
29 | public function GAMainCode() |
||
33 | |||
34 | public function GAMainSite() |
||
38 | |||
39 | /** |
||
40 | * |
||
41 | * @return Boolean |
||
42 | */ |
||
43 | public function ShowReallyAnnoyingYellowBar() |
||
47 | |||
48 | public function InsertGoogleAnalyticsAsHeadTag() |
||
52 | |||
53 | public function canEditThisPage() |
||
60 | } |
||
61 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.