Core
3 weeks ago
Twitter
3 weeks ago
Config.php
3 weeks ago
EventRecorder.php
3 weeks ago
ReporterInterface.php
3 weeks ago
SmashUsageTracking.php
3 weeks ago
ReporterInterface.php
49 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Usage Tracking Reporter Interface |
| 4 | * |
| 5 | * Implemented by plugin-specific reporters for the Smash Usage Tracking module. |
| 6 | * |
| 7 | * @package TwitterFeed\UsageTracking |
| 8 | * @since 2.6 |
| 9 | */ |
| 10 | |
| 11 | namespace TwitterFeed\UsageTracking; |
| 12 | |
| 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 14 | exit; |
| 15 | } |
| 16 | |
| 17 | interface ReporterInterface { |
| 18 | |
| 19 | /** |
| 20 | * Plugin identifier for payload root (e.g. 'twitter'). |
| 21 | * |
| 22 | * @return string |
| 23 | */ |
| 24 | public function get_plugin_slug(); |
| 25 | |
| 26 | /** |
| 27 | * Schema version for the report payload. |
| 28 | * |
| 29 | * @return string |
| 30 | */ |
| 31 | public function get_schema_version(); |
| 32 | |
| 33 | /** |
| 34 | * Configuration snapshot (environment, settings, sources, feeds). |
| 35 | * |
| 36 | * @return array |
| 37 | */ |
| 38 | public function get_configuration_snapshot(); |
| 39 | |
| 40 | /** |
| 41 | * Dynamic metrics for a time period (performance, errors, events). |
| 42 | * |
| 43 | * @param string $period_start Start of period (e.g. ISO 8601 or timestamp). |
| 44 | * @param string $period_end End of period (e.g. ISO 8601 or timestamp). |
| 45 | * @return array |
| 46 | */ |
| 47 | public function get_dynamic_metrics( $period_start, $period_end ); |
| 48 | } |
| 49 |