\OpauthResponseHelper
OpauthResponseHelper Utility class for handling responses from Opauth.
Used in parsing. Can and should be referenced in _config.yml for helping
parse things for member_mapping.
- Author: Will Morgan <@willmorgan>
- Copyright: Copyright (c) 2013, Better Brief LLP
Synopsis
class OpauthResponseHelper
{
- // methods
- public static string get_first_name()
- public static string get_last_name()
- public static string get_twitter_locale()
- public static string get_google_locale()
- public static string get_smart_locale()
- public static string|null parse_source_path()
Methods
public
- get_first_name() — Take the first part of the name
- get_google_locale() — Google responds near perfectly for locales, if populated.
- get_last_name() — Take all but the first part of the name
- get_smart_locale() — Try very hard to get a locale for this user. Helps for i18n etc.
- get_twitter_locale() — Twitter responds with just a language (also a TZ, but unused for now) If the PECL Locale extension is used it may be possible to combine both the TZ and the language to fine tune a user's location, but a bit OTT.
- parse_source_path() — Dot notation parser. Looks for an index or fails gracefully if not found.