NamespaceScope
in package
FinalYes
The `{org_id}`/`{tenant_id}` a namespace handle substitutes into its routes (CONTRACT.md §27.4 rule 3).
Both default to the client's own identifiers. A handle can be re-scoped with
ManagementSupport::inOrg() /
forTenant(), which returns a NEW handle rather than mutating the one you called it
on — an administrator holding a handle to their own tenant should not find it silently
repointed at someone else's because an unrelated code path re-scoped a shared object.
Table of Contents
Properties
Methods
- __construct() : mixed
- withOrg() : self
- This scope with `{org_id}` pinned to `$orgId`, leaving `{tenant_id}` as it was.
- withTenant() : self
- This scope with `{tenant_id}` pinned to `$tenantId`, leaving `{org_id}` as it was.
Properties
$orgId read-only
public
string|null
$orgId
= null
$tenantId read-only
public
string|null
$tenantId
= null
Methods
__construct()
public
__construct([string|null $orgId = null ][, string|null $tenantId = null ]) : mixed
Parameters
- $orgId : string|null = null
-
Overrides the client's organization id;
nulluses it. - $tenantId : string|null = null
-
Overrides the client's tenant id;
nulluses it.
withOrg()
This scope with `{org_id}` pinned to `$orgId`, leaving `{tenant_id}` as it was.
public
withOrg(string $orgId) : self
Parameters
- $orgId : string
Return values
selfwithTenant()
This scope with `{tenant_id}` pinned to `$tenantId`, leaving `{org_id}` as it was.
public
withTenant(string $tenantId) : self
Parameters
- $tenantId : string