1 | <?php |
||
17 | final class CallbackGenerator implements MentionGeneratorInterface |
||
18 | { |
||
19 | /** |
||
20 | * 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 |
||
21 | * |
||
22 | * @var callable(Mention): ?AbstractInline |
||
23 | */ |
||
24 | private $callback; |
||
25 | |||
26 | 27 | public function __construct(callable $callback) |
|
30 | |||
31 | 27 | public function generateMention(Mention $mention): ?AbstractInline |
|
48 | } |
||
49 |