public function Client::getServer in OAuth2 Server 2.0.x
Same name and namespace in other branches
- 8 src/Entity/Client.php \Drupal\oauth2_server\Entity\Client::getServer()
Returns the server the client belongs to.
Return value
\Drupal\oauth2_server\ServerInterface Returns the server object the client belongs to.
Overrides ClientInterface::getServer
File
- src/
Entity/ Client.php, line 132
Class
- Client
- Defines the OAuth2 client entity.
Namespace
Drupal\oauth2_server\EntityCode
public function getServer() {
if (!$this->server && $this->server_id) {
$this->server = \Drupal::entityTypeManager()
->getStorage('oauth2_server')
->load($this->server_id);
}
return $this->server;
}