public function EdgeKeyTypeBase::getEndpointType in Apigee Edge 8
Gets the API endpoint type (default or custom).
It returns "default" on a public cloud instance, otherwise "custom".
Parameters
\Drupal\key\KeyInterface $key: The key entity.
Return value
string The API endpoint type.
Overrides EdgeKeyTypeInterface::getEndpointType
Deprecated
in apigee_edge:8.x-1.2 and is removed from apigee_edge:8.x-2.0. Use getInstanceType() instead.
See also
https://github.com/apigee/apigee-edge-drupal/issues/268
File
- src/
Plugin/ EdgeKeyTypeBase.php, line 83
Class
- EdgeKeyTypeBase
- Defines a base class for Apigee Edge Key Type plugins.
Namespace
Drupal\apigee_edge\PluginCode
public function getEndpointType(KeyInterface $key) : string {
if ($this
->getInstanceType($key) === EdgeKeyTypeInterface::INSTANCE_TYPE_PUBLIC) {
/* @phpstan-ignore-next-line */
return EdgeKeyTypeInterface::EDGE_ENDPOINT_TYPE_DEFAULT;
}
/* @phpstan-ignore-next-line */
return EdgeKeyTypeInterface::EDGE_ENDPOINT_TYPE_CUSTOM;
}