1 | <?php |
||
5 | class InstagramPageExtension extends DataExtension |
||
|
|||
6 | { |
||
7 | /** |
||
8 | * @var array |
||
9 | */ |
||
10 | private static $casting = [ |
||
11 | 'instagramShortcodeHandler' => 'HTMLText', |
||
12 | ]; |
||
13 | |||
14 | /** |
||
15 | * Gets a list of media from the cache. |
||
16 | * |
||
17 | * @param InstagramAccount $instagramAccount |
||
18 | * @param string $maxID |
||
19 | * @return array|null |
||
20 | */ |
||
21 | public static function getMediaFromCache($instagramAccount, $maxID) |
||
31 | |||
32 | /** |
||
33 | * Gets a list of media from Instagram. |
||
34 | * |
||
35 | * @param InstagramAccount $instagramAccount |
||
36 | * @param string $maxID |
||
37 | * @return array|null |
||
38 | */ |
||
39 | public static function getMediaFromInstagram($instagramAccount, $maxID) |
||
56 | |||
57 | /** |
||
58 | * Updates the cache with media fetched from Instagram. |
||
59 | * |
||
60 | * @param InstagramAccount $instagramAccount |
||
61 | * @param string $maxID |
||
62 | * @param array $media |
||
63 | * @return null |
||
64 | */ |
||
65 | public static function updateCachedMedia($instagramAccount, $maxID, $media) |
||
70 | |||
71 | /** |
||
72 | * Gets a list of media from the cache if available. Falls back to making an API request. |
||
73 | * |
||
74 | * @param InstagramAccount $instagramAccount |
||
75 | * @param string $maxID |
||
76 | * @return array|null |
||
77 | */ |
||
78 | public static function getMedia($instagramAccount, $maxID) { |
||
91 | |||
92 | /** |
||
93 | * Handler for the `instagram` Shortcode. |
||
94 | * |
||
95 | * @return string|null |
||
96 | */ |
||
97 | public static function instagramShortcodeHandler($args, $content = null, $parser = null, $tag) |
||
149 | } |
||
150 |
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.