public function ManagementApiEdgeEntityControllerProxy::__construct in Apigee Edge 8
ManagementApiEntityControllerBase constructor.
Parameters
object $controller: A controller from the SDK with CRUDL capabilities. It gets validated whether it implements the required interfaces.
File
- src/
Entity/ Controller/ ManagementApiEdgeEntityControllerProxy.php, line 48
Class
- ManagementApiEdgeEntityControllerProxy
- Management API specific default entity controller implementation.
Namespace
Drupal\apigee_edge\Entity\ControllerCode
public function __construct($controller) {
if (!$controller instanceof EntityCrudOperationsControllerInterface) {
throw new InvalidArgumentException(sprintf('Controller must implement %s interface.', EntityCrudOperationsControllerInterface::class));
}
if (!$controller instanceof NonPaginatedEntityListingControllerInterface && !$controller instanceof PaginatedEntityListingControllerInterface) {
throw new InvalidArgumentException(sprintf('Controller must implement either %s or %s interfaces.', NonPaginatedEntityListingControllerInterface::class, PaginatedEntityListingControllerInterface::class));
}
$this->controller = $controller;
}