public function AbstractAppCredentialEvent::__construct in Apigee Edge 8
AppCredentialGenerateEvent constructor.
Parameters
string $app_type: Either company or developer.
string $owner_id: Company name or developer id (UUID by default) depending on the appType.
string $app_name: Name of the app.
\Apigee\Edge\Api\Management\Entity\AppCredentialInterface $credential: The app credential that has been created.
2 calls to AbstractAppCredentialEvent::__construct()
- AppCredentialAddApiProductEvent::__construct in src/
Event/ AppCredentialAddApiProductEvent.php - AppCredentialAddApiProductEvent constructor.
- AppCredentialDeleteApiProductEvent::__construct in src/
Event/ AppCredentialDeleteApiProductEvent.php - AppCredentialDeleteApiProductEvent constructor.
2 methods override AbstractAppCredentialEvent::__construct()
- AppCredentialAddApiProductEvent::__construct in src/
Event/ AppCredentialAddApiProductEvent.php - AppCredentialAddApiProductEvent constructor.
- AppCredentialDeleteApiProductEvent::__construct in src/
Event/ AppCredentialDeleteApiProductEvent.php - AppCredentialDeleteApiProductEvent constructor.
File
- src/
Event/ AbstractAppCredentialEvent.php, line 85
Class
- AbstractAppCredentialEvent
- Base class for app credential create, generate and add products events.
Namespace
Drupal\apigee_edge\EventCode
public function __construct(string $app_type, string $owner_id, string $app_name, AppCredentialInterface $credential) {
if (!in_array($app_type, [
self::APP_TYPE_DEVELOPER,
self::APP_TYPE_TEAM,
])) {
throw new \InvalidArgumentException('App type must be either team or developer.');
}
$this->appType = $app_type;
$this->ownerId = $owner_id;
$this->appName = $app_name;
$this->credential = $credential;
}