public function parseToken($key = 'access_token')
    {
        if ( $token = $this->getToken() )
        {
            $token_array = json_decode($token, true);

            return $token_array[$key];
        }
    }
public function parseToken($key = 'access_token')
    {
        if ( $token = $this->getToken() )
        {
            $token_array = json_decode($token, true);

            return $token_array[$key];
        }
    }
public function parseToken ( $ key = 'access_token' ) { if ( $ token = $ this -> getToken ( ) ) { $ token_array = json_decode ( $ token , true ) ; return $ token_array [ $ key ] ; } }
Get parsed token element
@param  $key - The key to parse
@return string - mixed key value
Get parsed token element