| 1 |
<?php |
| 2 |
namespace Imagify\Stats; |
| 3 |
|
| 4 |
defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); |
| 5 |
|
| 6 |
/** |
| 7 |
* Interface to use to get and cache a stat. |
| 8 |
* |
| 9 |
* @since 1.9 |
| 10 |
* @author Grégory Viguier |
| 11 |
*/ |
| 12 |
interface StatInterface { |
| 13 |
|
| 14 |
/** |
| 15 |
* Get the stat value. |
| 16 |
* |
| 17 |
* @since 1.9 |
| 18 |
* @access public |
| 19 |
* @author Grégory Viguier |
| 20 |
* |
| 21 |
* @return mixed |
| 22 |
*/ |
| 23 |
public function get_stat(); |
| 24 |
|
| 25 |
/** |
| 26 |
* Get and cache the stat value. |
| 27 |
* |
| 28 |
* @since 1.9 |
| 29 |
* @access public |
| 30 |
* @author Grégory Viguier |
| 31 |
* |
| 32 |
* @return mixed |
| 33 |
*/ |
| 34 |
public function get_cached_stat(); |
| 35 |
|
| 36 |
/** |
| 37 |
* Clear the stat cache. |
| 38 |
* |
| 39 |
* @since 1.9 |
| 40 |
* @access public |
| 41 |
* @author Grégory Viguier |
| 42 |
*/ |
| 43 |
public function clear_cache(); |
| 44 |
} |
| 45 |
|