This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* @package ogre-consent
|
||||
* @author cleverogre
|
||||
* @copyright 2026 CleverOgre
|
||||
* @license GLP-3.0-or-later
|
||||
* @version 0.0.0
|
||||
* @since 0.0.0
|
||||
*/
|
||||
|
||||
namespace Ogre\Consent;
|
||||
|
||||
use Ogre\Consent as Plugin;
|
||||
use Ogre\Singleton;
|
||||
use WP_HTML_Tag_Processor;
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
final class Services {
|
||||
use Singleton;
|
||||
|
||||
protected array $services = [];
|
||||
|
||||
protected function __construct() {
|
||||
|
||||
}
|
||||
|
||||
public function register(Service $service): void
|
||||
{
|
||||
$this->services[] = $service;
|
||||
}
|
||||
|
||||
public function get_config(): array
|
||||
{
|
||||
return array_map(fn (Service $service): array => $service->get_config(), $this->services);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Services::instance();
|
||||
Reference in New Issue
Block a user