| 1 | <?php |
||
| 19 | final class CallbackGenerator implements MentionGeneratorInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * A callback function which sets the URL on the passed mention and returns the mention, return a new AbstractInline based object or null if the mention is not a match |
||
| 23 | * |
||
| 24 | * @var callable(Mention): ?AbstractInline |
||
| 25 | */ |
||
| 26 | private $callback; |
||
| 27 | |||
| 28 | 27 | public function __construct(callable $callback) |
|
| 32 | |||
| 33 | 27 | public function generateMention(Mention $mention): ?AbstractInline |
|
| 50 | } |
||
| 51 |