Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | /** |
| 3 | * |
| 4 | * This file is part of the phpBB Forum Software package. |
| 5 | * |
| 6 | * @copyright (c) phpBB Limited <https://www.phpbb.com> |
| 7 | * @license GNU General Public License, version 2 (GPL-2.0) |
| 8 | * |
| 9 | * For full copyright and license information, please see |
| 10 | * the docs/CREDITS.txt file. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | namespace phpbb\mention\source; |
| 15 | |
| 16 | interface source_interface |
| 17 | { |
| 18 | /** |
| 19 | * Searches database for names to mention |
| 20 | * and alters the passed array of found items |
| 21 | * |
| 22 | * @param array $names Array of already fetched data with names |
| 23 | * @param string $keyword Search string |
| 24 | * @param int $topic_id Current topic ID |
| 25 | * @return bool Whether there are no more satisfying names left |
| 26 | */ |
| 27 | public function get(array &$names, string $keyword, int $topic_id): bool; |
| 28 | |
| 29 | /** |
| 30 | * Returns the priority of the currently selected name |
| 31 | * Please note that simple inner priorities for a certain source |
| 32 | * can be set with ORDER BY SQL clause |
| 33 | * |
| 34 | * @param array $row Array of fetched data for the name type (e.g. user row) |
| 35 | * @return int Priority (defaults to 1) |
| 36 | */ |
| 37 | public function get_priority(array $row): int; |
| 38 | } |