PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 2.16.0
GiveWP – Donation Plugin and Fundraising Platform v2.16.0
4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 All 253 releases
give / src / Log / ValueObjects / LogType.php
LogType.php
52 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Give\Log\ValueObjects;
4
5 /**
6 * Class LogType
7 * @package Give\Log\ValueObjects
8 *
9 * @since 2.10.0
10 *
11 * @method static ERROR()
12 * @method static WARNING()
13 * @method static NOTICE()
14 * @method static SUCCESS()
15 * @method static INFO()
16 * @method static HTTP()
17 * @method static SPAM()
18 */
19 class LogType extends Enum {
20 const ERROR = 'error';
21 const WARNING = 'warning';
22 const NOTICE = 'notice';
23 const SUCCESS = 'success';
24 const INFO = 'info';
25 const HTTP = 'http';
26 const SPAM = 'spam';
27
28 /**
29 * @inheritDoc
30 */
31 public static function getDefault() {
32 return LogType::ERROR;
33 }
34
35 /**
36 * Get types translated
37 *
38 * @return array
39 */
40 public static function getTypesTranslated() {
41 return [
42 self::ERROR => esc_html__( 'Error', 'give' ),
43 self::WARNING => esc_html__( 'Warning', 'give' ),
44 self::NOTICE => esc_html__( 'Notice', 'give' ),
45 self::SUCCESS => esc_html__( 'Success', 'give' ),
46 self::INFO => esc_html__( 'Info', 'give' ),
47 self::HTTP => esc_html__( 'HTTP', 'give' ),
48 self::SPAM => esc_html__( 'Spam', 'give' ),
49 ];
50 }
51 }
52