1 | <?php namespace Anomaly\UsersModule\User; |
||
12 | class UserMentions |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * The URL generator. |
||
17 | * |
||
18 | * @var UrlGenerator |
||
19 | */ |
||
20 | protected $url; |
||
21 | |||
22 | /** |
||
23 | * Create a new UserMentions instance. |
||
24 | * |
||
25 | * @param UrlGenerator $url |
||
26 | */ |
||
27 | public function __construct(UrlGenerator $url) |
||
31 | |||
32 | /** |
||
33 | * Find all mentions in the text. |
||
34 | * |
||
35 | * @param $text |
||
36 | * @return array |
||
37 | */ |
||
38 | public function find($text) |
||
49 | |||
50 | /** |
||
51 | * Replace mentions in the text with links. |
||
52 | * |
||
53 | * @param $text |
||
54 | * @return string |
||
55 | */ |
||
56 | public function linkify($text) |
||
66 | } |
||
67 |