SiteScope
Corex\Multisite\SiteScope · interface · Core layer
Public API
Section titled “Public API”currentSiteId(): int
Section titled “currentSiteId(): int”register(SiteScoped $service): void
Section titled “register(SiteScoped $service): void”Register a memoizing service for invalidation. Idempotent per instance.
run(int $siteId, Closure $callback): mixed
Section titled “run(int $siteId, Closure $callback): mixed”Run the callback with the site current, restoring the previous site even if it throws.