| 1 |
<?php |
| 2 |
|
| 3 |
namespace cybot\cookiebot\lib; |
| 4 |
|
| 5 |
interface Cookie_Consent_Interface { |
| 6 |
|
| 7 |
|
| 8 |
/** |
| 9 |
* Scans cookiebot consent cookie and fills in $states with accepted consents. |
| 10 |
* |
| 11 |
* @since 1.2.0 |
| 12 |
*/ |
| 13 |
public function scan_cookie(); |
| 14 |
|
| 15 |
/** |
| 16 |
* Adds state to $states variable |
| 17 |
* |
| 18 |
* @param $state string new state |
| 19 |
* |
| 20 |
* @since 1.2.0 |
| 21 |
*/ |
| 22 |
public function add_state( $state ); |
| 23 |
|
| 24 |
/** |
| 25 |
* Returns cookiebot cookie consent state |
| 26 |
* |
| 27 |
* @return array array List of accepted cookiebot consents |
| 28 |
* |
| 29 |
* @since 1.2.0 |
| 30 |
*/ |
| 31 |
public function get_cookie_states(); |
| 32 |
|
| 33 |
/** |
| 34 |
* Checks if the cookie state is accepted |
| 35 |
* |
| 36 |
* @param $state string Cookie state to check if it is accepted |
| 37 |
* |
| 38 |
* @return bool |
| 39 |
* |
| 40 |
* @since 1.2.0 |
| 41 |
*/ |
| 42 |
public function is_cookie_state_accepted( $state ); |
| 43 |
|
| 44 |
/** |
| 45 |
* Checks if the cookie states are accepted. |
| 46 |
* |
| 47 |
* @param $states array Cookie states to check if it is accepted. |
| 48 |
* |
| 49 |
* @return bool |
| 50 |
* |
| 51 |
* @since 1.3.0 |
| 52 |
*/ |
| 53 |
public function are_cookie_states_accepted( array $states ); |
| 54 |
} |
| 55 |
|