| 1 |
<?php |
| 2 |
/** |
| 3 |
* Strict interface for Charitable Fields APIs. |
| 4 |
* |
| 5 |
* @package Charitable/Interfaces/Charitable_Field_Interface |
| 6 |
* @author Eric Daams |
| 7 |
* @copyright Copyright (c) 2018, Studio 164a |
| 8 |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
| 9 |
* @version 1.5.0 |
| 10 |
* @version 1.5.0 |
| 11 |
*/ |
| 12 |
|
| 13 |
// Exit if accessed directly. |
| 14 |
if ( ! defined( 'ABSPATH' ) ) { |
| 15 |
exit; |
| 16 |
} |
| 17 |
|
| 18 |
if ( ! interface_exists( 'Charitable_Field_Interface' ) ) : |
| 19 |
|
| 20 |
/** |
| 21 |
* Charitable_Field_Interface interface. |
| 22 |
* |
| 23 |
* @since 1.5.0 |
| 24 |
*/ |
| 25 |
interface Charitable_Field_Interface { |
| 26 |
|
| 27 |
/** |
| 28 |
* Returna particular field argument. |
| 29 |
* |
| 30 |
* @since 1.5.0 |
| 31 |
* |
| 32 |
* @param string $key The field's key. |
| 33 |
* @return mixed |
| 34 |
*/ |
| 35 |
public function __get( $key ); |
| 36 |
|
| 37 |
/** |
| 38 |
* Return a single field. |
| 39 |
* |
| 40 |
* @since 1.5.0 |
| 41 |
* |
| 42 |
* @param string $key The field's key. |
| 43 |
* @param mixed $value The field's value. |
| 44 |
* @return void |
| 45 |
*/ |
| 46 |
public function __set( $key, $value ); |
| 47 |
} |
| 48 |
|
| 49 |
endif; |
| 50 |
|