/** * Initialize the signature method's driver * * @access public * @param string $method * @param string $identifier * @throw Oauth_Exception * @return object instance of the method's driver */ public static function factory($method, $identifier) { static $instance; if (!isset($instance[$method])) { $class = __CLASS__ . '_' . str_replace('-', '_', $method); if (class_exists($class)) { $instance[$method] = new $class(); } else { throw new Oauth2_Exception('invalid_algorithm'); } } self::$identifier = $identifier; return $instance[$method]; }
/** * Oauth_Signature::factory alias * * @access public * @param string $method * @param string $identifier * @return object * @see Oauth_Signature::factory */ public static function signature($method, $identifier) { return Oauth2_Signature::factory($method, $identifier); }