Sometimes a transformer can't return a subject. In this case transform() will return null instead of throwing an exception. This means an automation can run until it comes to a step where the subject would be needed. There it would fail. [PREMIUM-248]
14 lines
294 B
PHP
14 lines
294 B
PHP
<?php declare(strict_types = 1);
|
|
|
|
namespace MailPoet\Automation\Engine\Integration;
|
|
|
|
use MailPoet\Automation\Engine\Data\Subject;
|
|
|
|
interface SubjectTransformer {
|
|
public function transform(Subject $data): ?Subject;
|
|
|
|
public function returns(): string;
|
|
|
|
public function accepts(): string;
|
|
}
|