PluginProbe ʕ •ᴥ•ʔ
WP STAGING – WordPress Backup, Restore, Migration & Clone / 3.1.3
WP STAGING – WordPress Backup, Restore, Migration & Clone v3.1.3
4.9.1 4.9.0 4.8.1 trunk 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.10.0 3.2.0 3.3.1 3.3.2 3.3.3 3.4.1 3.4.3 3.5.0 3.6.0 3.7.1 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 4.0.0 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.2.0 4.2.1 4.3.0 4.3.1 4.3.2 4.4.0 4.5.0 4.6.0 4.7.0 4.7.1 4.7.2 4.7.3 4.8.0
wp-staging / Framework / DI / FeatureProviderInterface.php
wp-staging / Framework / DI Last commit date
Container.php 2 years ago FeatureProviderInterface.php 4 years ago FeatureServiceProvider.php 4 years ago Resolver.php 3 years ago ServiceProvider.php 3 years ago
FeatureProviderInterface.php
51 lines
1 <?php
2
3 /**
4 * The API provided by a Service Provider that completely provides a feature.
5 *
6 * @package WPStaging\Framework\DI
7 */
8
9 namespace WPStaging\Framework\DI;
10
11 /**
12 * Interface FeatureProviderInterface
13 *
14 * @package WPStaging\Framework\DI
15 */
16 interface FeatureProviderInterface
17 {
18 /**
19 * Returns whether the feature provided by the provider is enabled or not.
20 *
21 * The check will happen on the feature provider trigger by checking if
22 * the feature is available (the trigger constant is defined and true) and, if so,
23 * if the environment var by the same name is not set to falsy value.
24 *
25 * @return bool Whether the feature provided is enabled or not.
26 */
27 public static function isEnabledInProduction();
28
29 /**
30 * Returns the constant, or environment variables, that will trigger the feature provider
31 * registration when set to truthy values.
32 *
33 * A Feature Provider MUST use the same name for both the constant that will enable it if
34 * defined AND true and for the environment variable that will disable it if set and falsy.
35 *
36 * @return string The name of the constant, or environment variable, that will trigger the
37 * feature provider registration when set to truthy values.
38 */
39 public static function getFeatureTrigger();
40
41 /**
42 * A Feature Provider MUST clearly indicate whether it did register or not.
43 *
44 * A Feature Provider might not register as it's not enabled or because its
45 * requirements are not satisfied.
46 *
47 * @return bool Whether the Feature Provider did register, as enabled, or not.
48 */
49 public function register();
50 }
51