Endpoints
4 months ago
Swagger
4 months ago
Messages_Interface.php
4 months ago
Post_Repository_Interface.php
4 months ago
Validator_Interface.php
4 months ago
Messages_Interface.php
49 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Pods\REST\Interfaces; |
| 4 | |
| 5 | // Don't load directly. |
| 6 | if ( ! defined( 'ABSPATH' ) ) { |
| 7 | die( '-1' ); |
| 8 | } |
| 9 | |
| 10 | /** |
| 11 | * Messages interface. |
| 12 | * |
| 13 | * @credit The Events Calendar team - https://github.com/the-events-calendar/tribe-common |
| 14 | * |
| 15 | * @since 3.0 |
| 16 | */ |
| 17 | interface Messages_Interface { |
| 18 | /** |
| 19 | * Returns the localized message associated with the slug. |
| 20 | * |
| 21 | * @since 3.0 |
| 22 | * |
| 23 | * @param string $message_slug |
| 24 | * |
| 25 | * @return string |
| 26 | */ |
| 27 | public function get_message( $message_slug ); |
| 28 | |
| 29 | /** |
| 30 | * Returns the associative array of all the messages handled by the class. |
| 31 | * |
| 32 | * @since 3.0 |
| 33 | * |
| 34 | * @return array An associative array in the `[ <slug> => <localized message> ]` format. |
| 35 | */ |
| 36 | public function get_messages(); |
| 37 | |
| 38 | /** |
| 39 | * Prefixes a message slug with a common root. |
| 40 | * |
| 41 | * @since 3.0 |
| 42 | * |
| 43 | * @param string $message_slug |
| 44 | * |
| 45 | * @return string The prefixed message slug. |
| 46 | */ |
| 47 | public function prefix_message_slug( $message_slug ); |
| 48 | } |
| 49 |