return array(
'client_id' => $client[0]->getId(),
'client secret' => $client[0]->getSecret(),
'redirect_uri' => ($client[0]->GetClientEndpoints())[0]->getRedirectUri(),
'name' => $client[0]->getName());
特别是片段:
($client[0]->GetClientEndpoints())[0]->getRedirectUri()
有没有办法我可以做到这一点而不必这样做:
$endpoints = $client[0]->GetClientEndpoints();
return array(
'client_id' => $client[0]->getId(),
'client secret' => $client[0]->getSecret(),
'redirect_uri' => $endpoints[0]->getRedirectUri(),
'name' => $client[0]->getName());