/**
  * Retrieve the name from a service instance.
  *
  * @param ServiceInterface $oauthService
  *
  * @return string
  */
 public static function getServiceName(ServiceInterface $oauthService)
 {
     if ($oauthService instanceof AbstractService) {
         return $oauthService->service();
     }
     return preg_replace('/^.*\\\\/', '', get_class($oauthService));
 }
예제 #2
0
 /**
  * @param array $config
  * @param ServiceInterface $service
  * @param array $options
  * @param $id
  */
 public function __construct(array $config, ServiceInterface $service, array $options, $id)
 {
     $this->config = $config;
     $this->service = $service;
     $this->options = $options;
     $this->id = $id;
     static::$provider = $service->service();
 }