1 | <?php |
||
17 | class ErroneousMessagesSelector |
||
18 | { |
||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $class; |
||
23 | |||
24 | /** |
||
25 | * @var ManagerRegistry |
||
26 | */ |
||
27 | protected $registry; |
||
28 | |||
29 | /** |
||
30 | * @param ManagerRegistry $registry |
||
31 | * @param string $class |
||
32 | */ |
||
33 | public function __construct(ManagerRegistry $registry, $class) |
||
38 | |||
39 | /** |
||
40 | * Retrieve messages with given type(s) and restrict to max attempts count. |
||
41 | * |
||
42 | * @param array $types |
||
43 | * @param int $maxAttempts |
||
44 | * |
||
45 | * @return array |
||
46 | */ |
||
47 | public function getMessages(array $types, $maxAttempts = 5) |
||
68 | } |
||
69 |