CoolCMS API

InternalCallContext
in package

FinalYes

Tells whether an internal call through the bridge is running.

Only ApiBridge::internalCall() sets the flag (enter before the call, leave in finally). It is separate from FieldAudienceContext::isInternal(), which the RBAC guard fills and which the emergency switch apiRbac.internalMode: off disables; with it the "call is internal" information would vanish and reading of uploaded files ({name, path}) would fail silently. The emergency mode must let everything through.

IMPORTANT: an outer HTTP request never sees the flag set. The service lives per request, starts at zero and only internalCall() raises it; a payload value cannot influence it.

It is a depth counter, not a bool, so a nested call (a presenter calling the bridge inside an internal call) restores the outer state instead of resetting it.

Table of Contents

Properties

$depth  : int

Methods

enter()  : void
Called only by {@see ApiBridge::internalCall()}, always paired with {@see leave()} in `finally`.
isActive()  : bool
leave()  : void

Properties

Methods

enter()

Called only by {@see ApiBridge::internalCall()}, always paired with {@see leave()} in `finally`.

public enter() : void
On this page

Search results