/** * Create service * * @param ServiceLocatorInterface $serviceLocator * * @return mixed */ public function createService(ServiceLocatorInterface $serviceLocator) { $me = new \ZendOAuth2\Client\LinkedIn(); $cf = $serviceLocator->get('Config'); $me->setOptions(new \ZendOAuth2\ClientOptions($cf['zendoauth2']['linkedin'])); return $me; }
public function getClient() { $me = new \ZendOAuth2\Client\LinkedIn(); $cf = Bootstrap::getServiceManager()->get('Config'); $me->setOptions(new \ZendOAuth2\ClientOptions($cf['zendoauth2']['linkedin'])); return $me; }