| 1 |
<?php |
| 2 |
/** |
| 3 |
* Genesis Blocks |
| 4 |
* Main init class for the Genesis Blocks plugin. |
| 5 |
* |
| 6 |
* @since 1.0.0 |
| 7 |
* @package Genesis\Blocks |
| 8 |
*/ |
| 9 |
|
| 10 |
declare(strict_types=1); |
| 11 |
namespace Genesis\Blocks; |
| 12 |
|
| 13 |
/** |
| 14 |
* Genesis Blocks PluginLoader class |
| 15 |
* |
| 16 |
* @since 1.0.0 |
| 17 |
*/ |
| 18 |
final class PluginLoader { |
| 19 |
/** |
| 20 |
* Environment Information |
| 21 |
* |
| 22 |
* @var array |
| 23 |
*/ |
| 24 |
public $context; |
| 25 |
|
| 26 |
/** |
| 27 |
* Class Constructor |
| 28 |
* |
| 29 |
* @since 0.1.0 |
| 30 |
* @param array $context Data such as 'path', 'url' and 'version'. |
| 31 |
*/ |
| 32 |
public function __construct( array $context ) { |
| 33 |
$this->context = $context; |
| 34 |
} |
| 35 |
|
| 36 |
/** |
| 37 |
* Initialization |
| 38 |
* Initialize class. |
| 39 |
* |
| 40 |
* @since 0.1.0 |
| 41 |
* @uses \Genesis\Blocks\ModuleLoader::init |
| 42 |
*/ |
| 43 |
public function init(): void { |
| 44 |
( new ModuleLoader( $this->context ) )->init(); |
| 45 |
} |
| 46 |
} |
| 47 |
|