Each endpoint will be a class that can implement get/post/put/delete methods. The routes are registered to WP REST API automatically based on the existence of implemented methods. The endpoint classes are handled standard services and therefore can leverage full powers of the DI container. [MAILPOET-4135]
21 lines
307 B
PHP
21 lines
307 B
PHP
<?php declare(strict_types = 1);
|
|
|
|
namespace MailPoet\Automation;
|
|
|
|
use MailPoet\Automation\API\API;
|
|
|
|
class Automation {
|
|
/** @var API */
|
|
private $api;
|
|
|
|
public function __construct(
|
|
API $api
|
|
) {
|
|
$this->api = $api;
|
|
}
|
|
|
|
public function initialize(): void {
|
|
$this->api->initialize();
|
|
}
|
|
}
|