PluginProbe
ElasticPress / 5.0.1
ElasticPress v5.0.1
5.3.5 5.3.4 3.6.5 3.6.6 4.0.0 4.0.1 4.1.0 4.2.0 4.2.1 4.2.2 4.3.0 4.3.1 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.6.0 4.6.1 4.7.0 4.7.1 4.7.2 5.0.0 5.0.1 5.0.2 All 108 releases
elasticpress / includes / classes / FeatureRequirementsStatus.php

FeatureRequirementsStatus.php in ElasticPress 5.0.1, at includes/classes/FeatureRequirementsStatus.php

53 lines 888 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Simple class for tracking a features requirement status
4 *
5 * @since 2.1
6 * @package elasticpress
7 */
8
9 namespace ElasticPress;
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit; // Exit if accessed directly.
13 }
14
15 /**
16 * Just an easy way to represent a feature requirements status
17 */
18 class FeatureRequirementsStatus {
19
20 /**
21 * Initialize class
22 *
23 * @param int $code Status code.
24 * @param string|array $message Message describing status.
25 * @since 2.2
26 */
27 public function __construct( $code, $message = null ) {
28 $this->code = $code;
29
30 $this->message = $message;
31 }
32
33 /**
34 * Returns the status of a feature
35 *
36 * 0 is no issues
37 * 1 is usable but there are warnings
38 * 2 is not usable
39 *
40 * @var int
41 * @since 2.2
42 */
43 public $code;
44
45 /**
46 * Optional message to describe status code
47 *
48 * @var string|array
49 * @since 2.2
50 */
51 public $message;
52 }
53