1 | <?php namespace FreedomCore\TrinityCore\Support\Common; |
||
7 | class Helper |
||
8 | { |
||
9 | |||
10 | /** |
||
11 | * Implementation of the recursive array search by key => $value |
||
12 | * @param array $array |
||
13 | * @param string $key |
||
14 | * @param $value |
||
15 | * @return array |
||
16 | */ |
||
17 | public static function arrayMultiSearch(array $array, string $key, $value) : array |
||
23 | |||
24 | /** |
||
25 | * Get character name as in database |
||
26 | * @param string $characterName |
||
27 | * @return string |
||
28 | */ |
||
29 | public static function getCharacterName(string $characterName) : string |
||
33 | |||
34 | /** |
||
35 | * Throw Runtime Exception |
||
36 | * @param string $message |
||
37 | * @throws \RuntimeException |
||
38 | */ |
||
39 | public static function throwRuntimeException(string $message) |
||
48 | |||
49 | /** |
||
50 | * Low level implementation of the recursive array search by key => $value |
||
51 | * @param array|integer $array |
||
52 | * @param string $key |
||
53 | * @param $value |
||
54 | * @param array $results |
||
55 | */ |
||
56 | private static function array_multi_search_base($array, string $key, $value, array &$results) |
||
70 | } |
||
71 |