for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace League\OAuth2\Client\Provider;
use League\OAuth2\Client\Tool\ArrayAccessorTrait;
/**
* @property array $response
* @property string $uid
*/
class LinkedInResourceOwner extends GenericResourceOwner
{
use ArrayAccessorTrait;
* Raw response
*
* @var array
protected $response;
* Creates new resource owner.
* @param array $response
public function __construct(array $response = array())
$this->response = $response;
}
* Gets resource owner attribute by key. The key supports dot notation.
* @return mixed
public function getAttribute($key)
return $this->getValueByKey($this->response, (string) $key);
* Get user firstname
* @return string|null
public function getFirstName()
return $this->getAttribute('firstName');
* Get user imageurl
public function getImageurl()
return $this->getAttribute('profilePicture');
* Get user lastname
public function getLastName()
return $this->getAttribute('lastName');
* Get user userId
public function getId()
return $this->getAttribute('id');
* Return all of the owner details available as an array.
* @return array
public function toArray()
return $this->response;