1 | <?php |
||
12 | class GoogleDfpSlotHelper extends Object |
||
|
|||
13 | { |
||
14 | private static $id; |
||
15 | |||
16 | private static $enable_in_dev = false; |
||
17 | |||
18 | public function GoogleDfpID() |
||
22 | |||
23 | public static function enable_in_dev() |
||
27 | |||
28 | /** |
||
29 | * Check if ads should be enabled |
||
30 | * By default they are enabled in "live" enviroment |
||
31 | * |
||
32 | * @return boolean |
||
33 | */ |
||
34 | public static function enabled() |
||
44 | |||
45 | /** |
||
46 | * |
||
47 | * ID - unique identifier of banner |
||
48 | * Layout - Controller ClassName where banner should be rendered |
||
49 | * Alias - name of banner (used to distinguish ) |
||
50 | * AdUnitPath - Full path of the ad unit with the network code and ad unit code. |
||
51 | * Size - An exact size of banner creative |
||
52 | * OutOfPage - if banner is "wallpaper" or "floater" type specify as "true" |
||
53 | * DfpTargetPage - current Page ID |
||
54 | * DfpTargetCategory - Parent Title of current Page ID |
||
55 | * DfpTargetCategoryParent - GrandParent Title of current Page ID (if has) |
||
56 | * |
||
57 | * @return mixed |
||
58 | */ |
||
59 | public static function slot_list() |
||
91 | |||
92 | /** |
||
93 | * Get one banner by ID |
||
94 | * |
||
95 | * |
||
96 | * @param $id |
||
97 | */ |
||
98 | public static function slot_by_id($id = false) |
||
104 | |||
105 | /** |
||
106 | * Get one banner by Alias name |
||
107 | * |
||
108 | * |
||
109 | * @param $alias |
||
110 | */ |
||
111 | public static function slot_by_alias($alias = false) |
||
117 | } |
||
118 |
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.