| 1 | <?php |
||
| 12 | abstract class Default_Loader implements Loader { |
||
| 13 | /** |
||
| 14 | * @var Features_Registry |
||
| 15 | */ |
||
| 16 | private $features_registry; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Default_Loader constructor. |
||
| 20 | */ |
||
| 21 | public function __construct() { |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Initialize all the dependencies needed by the feature inside this method. |
||
| 27 | * @return void |
||
| 28 | */ |
||
| 29 | public abstract function init_all_dependencies(); |
||
| 30 | |||
| 31 | protected abstract function get_feature_slug(); |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return bool true if the feature wants to be enabled by default |
||
| 35 | */ |
||
| 36 | protected abstract function get_feature_default_value(); |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Register feature to registry. |
||
| 40 | */ |
||
| 41 | public function init_feature() { |
||
| 50 | |||
| 51 | |||
| 52 | } |