| [ Index ] | PHP Cross Reference of phpBB-3.1.12-deutsch | 
[Source view] [Print] [Project Stats]
This file is part of the phpBB Forum Software package.
| Copyright: | (c) phpBB Limited | 
| License: | GNU General Public License, version 2 (GPL-2.0) | 
| File Size: | 936 lines (27 kb) | 
| Included or required: | 0 times | 
| Referenced: | 0 times | 
| Includes or requires: | 0 files | 
user:: (18 methods):
  __construct()
  set_custom_lang_path()
  setup()
  lang()
  get_plural_form()
  add_lang()
  add_lang_ext()
  set_lang()
  format_date()
  create_datetime()
  get_timestamp_from_format()
  get_iso_lang_id()
  get_profile_fields()
  img()
  optionget()
  optionset()
  leave_newly_registered()
  get_passworded_forums()
| __construct($datetime_class) X-Ref | 
| Constructor to set the lang path param: string $datetime_class Class name of datetime class | 
| set_custom_lang_path($lang_path) X-Ref | 
| Function to set custom language path (able to use directory outside of phpBB) param: string $lang_path New language path used. | 
| setup($lang_set = false, $style_id = false) X-Ref | 
| Setup basic user-specific items (style, language, ...) | 
| lang() X-Ref | 
| More advanced language substitution Function to mimic sprintf() with the possibility of using phpBB's language system to substitute nullar/singular/plural forms. Params are the language key and the parameters to be substituted. This function/functionality is inspired by SHS` and Ashe. Example call: <samp>$user->lang('NUM_POSTS_IN_QUEUE', 1);</samp> If the first parameter is an array, the elements are used as keys and subkeys to get the language entry: Example: <samp>$user->lang(array('datetime', 'AGO'), 1)</samp> uses $user->lang['datetime']['AGO'] as language entry. | 
| get_plural_form($number, $force_rule = false) X-Ref | 
| Determine which plural form we should use. For some languages this is not as simple as for English. param: $number int|float The number we want to get the plural case for. Float numbers are floored. param: $force_rule mixed False to use the plural rule of the language package return: int The plural-case we need to use for the number plural-rule combination | 
| add_lang($lang_set, $use_db = false, $use_help = false, $ext_name = '') X-Ref | 
| Add Language Items - use_db and use_help are assigned where needed (only use them to force inclusion) param: mixed $lang_set specifies the language entries to include param: bool $use_db internal variable for recursion, do not use param: bool $use_help internal variable for recursion, do not use param: string $ext_name The extension to load language from, or empty for core files | 
| add_lang_ext($ext_name, $lang_set, $use_db = false, $use_help = false) X-Ref | 
| Add Language Items from an extension - use_db and use_help are assigned where needed (only use them to force inclusion) param: string $ext_name The extension to load language from, or empty for core files param: mixed $lang_set specifies the language entries to include param: bool $use_db internal variable for recursion, do not use param: bool $use_help internal variable for recursion, do not use | 
| set_lang(&$lang, &$help, $lang_file, $use_db = false, $use_help = false, $ext_name = '') X-Ref | 
| Set language entry (called by add_lang) | 
| format_date($gmepoch, $format = false, $forcedate = false) X-Ref | 
| Format user date param: int $gmepoch unix timestamp param: string $format date format in date() notation. | used to indicate relative dates, for example |d m Y|, h:i is translated to Today, h:i. param: bool $forcedate force non-relative date format. return: mixed translated date | 
| create_datetime($time = 'now', \DateTimeZone $timezone = null) X-Ref | 
| Create a \phpbb\datetime object in the context of the current user param: string $time String in a format accepted by strtotime(). param: DateTimeZone $timezone Time zone of the time. return: \phpbb\datetime Date time object linked to the current users locale | 
| get_timestamp_from_format($format, $time, \DateTimeZone $timezone = null) X-Ref | 
| Get the UNIX timestamp for a datetime in the users timezone, so we can store it in the database. param: string $format Format of the entered date/time param: string $time Date/time with the timezone applied param: DateTimeZone $timezone Timezone of the date/time, falls back to timezone of current user return: int Returns the unix timestamp | 
| get_iso_lang_id() X-Ref | 
| Get language id currently used by the user | 
| get_profile_fields($user_id) X-Ref | 
| Get users profile fields | 
| img($img, $alt = '') X-Ref | 
| Specify/Get image | 
| optionget($key, $data = false) X-Ref | 
| Get option bit field from user options. param: int $key option key, as defined in $keyoptions property. param: int $data bit field value to use, or false to use $this->data['user_options'] return: bool true if the option is set in the bit field, false otherwise | 
| optionset($key, $value, $data = false) X-Ref | 
| Set option bit field for user options. param: int $key Option key, as defined in $keyoptions property. param: bool $value True to set the option, false to clear the option. param: int $data Current bit field value, or false to use $this->data['user_options'] return: int|bool If $data is false, the bit field is modified and | 
| leave_newly_registered() X-Ref | 
| Funtion to make the user leave the NEWLY_REGISTERED system group. | 
| get_passworded_forums() X-Ref | 
| Returns all password protected forum ids the user is currently NOT authenticated for. return: array Array of forum ids | 
| Generated: Thu Jan 11 00:25:41 2018 | Cross-referenced by PHPXref 0.7.1 |