AXIAM PHP SDK

ManagementSupport
in package

AbstractYes

Base class for the 24 generated namespace handles (CONTRACT.md §27.2).

Holds the two things every handle needs and nothing else: the shared ManagementTransport and the NamespaceScope its routes substitute. Keeping this hand-written means the generator emits only operations — the scope override semantics of §27.4 rule 3 are written once and reviewed once, rather than regenerated into 24 places where they could quietly diverge.

§27.2 asks for namespace HANDLES, not a flat symbol list: $client->management() ->users()->get($id). Only the C and C++ SDKs take §27.3's flat-symbol accommodation, and only because their languages have no method-bearing namespace to hang one on.

inOrg()/forTenant() return new static(...), which is only sound while every subclass keeps this constructor's signature. That is declared rather than assumed: @phpstan-consistent-constructor makes PHPStan ENFORCE it across all 24 generated handles, so a handle that grew a constructor of its own fails the build instead of failing at runtime on the one call that re-scopes it.

Tags
phpstan-consistent-constructor

Table of Contents

Methods

__construct()  : mixed
forTenant()  : static
A COPY of this handle scoped to `$tenantId` (§27.4 rule 3). See {@see self::inOrg()} for why it copies.
inOrg()  : static
A COPY of this handle scoped to `$orgId` (§27.4 rule 3).

Methods

__construct()

public __construct(ManagementTransport $transport[, NamespaceScope $scope = new NamespaceScope() ][, string|null $clientOrgId = null ][, string|null $clientTenantId = null ]) : mixed
Parameters
$transport : ManagementTransport

The one wire path (§27.8).

$scope : NamespaceScope = new NamespaceScope()

Per-handle {org_id}/{tenant_id} overrides.

$clientOrgId : string|null = null

The client's own organization id, or null.

$clientTenantId : string|null = null

The client's own tenant id, or null.

forTenant()

A COPY of this handle scoped to `$tenantId` (§27.4 rule 3). See {@see self::inOrg()} for why it copies.

public forTenant(string $tenantId) : static
Parameters
$tenantId : string
Return values
static

inOrg()

A COPY of this handle scoped to `$orgId` (§27.4 rule 3).

public inOrg(string $orgId) : static

Returns a new handle rather than mutating this one. An administrator holding a handle to their own organization should not find it repointed at someone else's because an unrelated code path re-scoped a shared object — and on a management surface that failure mode writes to the wrong tenant rather than merely reading from it.

Parameters
$orgId : string
Return values
static
On this page

Search results