1 | <?php |
||
28 | trait LocalizedString |
||
29 | { |
||
30 | /** @} */ |
||
31 | |||
32 | abstract public function getLanguageRedis(string $default_language = 'en', int $expiring_time = 86400) : string; |
||
34 | |||
35 | /** |
||
36 | * \addtogroup Localization Localization |
||
37 | * @{ |
||
38 | */ |
||
39 | |||
40 | /** \brief Current user/group language. */ |
||
41 | public $language; |
||
42 | |||
43 | /** \brief (<i>Internal</i>) True if the bot is using webhook? */ |
||
44 | protected $_is_webhook; |
||
45 | |||
46 | /** |
||
47 | * \brief Get a localized string giving an index. |
||
48 | * \details Using LocalizedString::language this method get the string of the index given localized string in language of the current user/group. |
||
49 | * This method will load the language first, using PhpBotFramework\Localization\Language::getLanguage(), if the language has not been set. |
||
50 | * If the localization file for the user/group language has not been load yet, it will load it (load only the single localization file if the bot is using webhook, load all otherwise). |
||
51 | * @param string $index Index of the localized string to get. |
||
52 | * @return string Localized string in the current user/group language. |
||
53 | */ |
||
54 | public function getStr($index) |
||
69 | |||
70 | /** @} */ |
||
71 | } |
||
72 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.