Add basic FeaturesController
[MAILPOET-2008]
This commit is contained in:
22
lib/Features/FeaturesController.php
Normal file
22
lib/Features/FeaturesController.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace MailPoet\Features;
|
||||
|
||||
class FeaturesController {
|
||||
|
||||
// Define features below in the following form:
|
||||
// const FEATURE_NAME_OF_FEATURE = 'name-of-feature';
|
||||
|
||||
// Define feature defaults in the array below in the following form:
|
||||
// self::FEATURE_NAME_OF_FEATURE => true,
|
||||
public static $defaults = [
|
||||
];
|
||||
|
||||
/** @return bool */
|
||||
function isSupported($feature) {
|
||||
if (!array_key_exists($feature, self::$defaults)) {
|
||||
throw new \RuntimeException("Unknown feature '$feature'");
|
||||
}
|
||||
return self::$defaults[$feature];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user