Example #1
0
 /**
  * Registers a client
  *
  * @param \PHPoAuthProvider\Client\Client The client to register
  */
 public function registerClient(Client $client)
 {
     $clients = $this->fetch('client');
     $id = uniqid('', true);
     $clients[$id] = ['id' => $id, 'type' => $client->getType(), 'name' => $client->getName(), 'website' => $client->getWebsite(), 'description' => $client->getDescription(), 'logo' => $client->getLogo(), 'redirectionEndpoint' => $client->getRedirectionEndpoint()];
     $this->persist('client', $clients);
 }