MMOframework
Pourquoi l'IA Playground Bibliothèques Développeurs Agence
FR EN
Créer un projet en direct
Index

InboxClient

MMO\admin\helpers · 1 symbole · générée le 30 Nov 2026

class

InboxClient

InboxClient.php:17

A server's inbox (InboxStore) over https, for InboxSync: its DeveloperController's api/developer/inbox routes, called with the token of an API client of the server (mmo.oauth's client_credentials), which holds dev.inbox -- no ssh, no git, nothing of this machine's on the server but the client's id and secret.

class MMO\admin\helpers\InboxClient
Espace de noms
MMO\admin\helpers
$client = new InboxClient('https://dev.oviepro.com', 'c-1a2b...', $secret); $client->entries(); // the entries not pulled yet $client->markPulled(['i-e790f911c1' => '25']);

Propriétés5

clientId

readonly
readonly string $clientId
Type
string

secret

protected string $secret
Type
string

timeout

readonly
readonly int $timeout
Type
int

token

protected ?string $token = null
Type
null | string

url

readonly
readonly string $url
Type
string

Méthodes6

call($path, $body)

InboxClient.php:56
protected function call(string $path, ?array $body = null): array
$pathstringbelow the site
$body = nullnull | arraysent as json in a POST; null for a GET
retournearraythe route's data

token()

InboxClient.php:43
protected function token(): string
retournestringthe Bearer token of the client (POST oauth/token), asked once

__construct($url, $clientId, $secret, $timeout)

InboxClient.php:27
function __construct(string $url, string $clientId, string $secret, int $timeout = 30)
$urlstringthe server's site (https://dev.oviepro.com)
$clientIdstringits API client's
$secretstringthe client's secret, read from this machine's configuration (configs/local.json)
$timeout = 30intseconds a call may take