-
-
Save dgafka/1e1d138349f990022da4fb46f755955c to your computer and use it in GitHub Desktop.
multi-tenancy-11.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
final readonly class HookTenantSwitchSubscription | |
{ | |
/** Hooking in tenant activation */ | |
#[OnTenantActivation] | |
public function whenActivated(string|ConnectionReference $tenantConnectionName, #[Header('tenant')] $tenantName): void | |
{ | |
echo sprintf("HOOKING into flow: Tenant name %s is about to be activated\n", $tenantName); | |
} | |
/** Hooking in tenant deactivation */ | |
#[OnTenantDeactivation] | |
public function whenDeactivated(string|ConnectionReference $tenantConnectionName, #[Header('tenant')] $tenantName): void | |
{ | |
echo sprintf("HOOKING into flow: Tenant name %s is about to be deactivated\n", $tenantName); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment