/** * instance method * * Get singleton instance of `Ai1ec_Loader`. * * @return Ai1ec_Loader Cached self instance */ public static function instance() { if (!self::$_instance instanceof Ai1ec_Loader) { self::$_instance = new Ai1ec_Loader(); } return self::$_instance; }
/** * Get a list of OAuth providers * * @return array Map of provider names and corresponding classes * * @staticvar $names Map of provider names and corresponding classes */ protected function _get_providers() { static $names = NULL; if (NULL === $names) { $classes = Ai1ec_Loader::instance()->get_matches('/^Ai1ec_Oauth_Provider_[A-Z][a-z]+$/'); $names = array(); foreach ($classes as $class) { $names[$this->_normalize_name($class)] = $class; } } return $names; }