Lue dans les fichiers PHP du paquet au commit fd661efca707 : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.
ConfigclassA gateway's configuration while its factory builds it: the options given, the factory's defaults under them, and the keys that must be filled.
4 methods
GatewayclassA gateway's actions behind one door: the first action supporting a request answers it.
11 methods
GatewayFactoryclassThe Omnibus way: a gateway's factory fills a Config - its name, title, capabilities, the options it needs, its client ("omnimeet.api", a closure of the Config: a provider's API, a token signer, a store) and its actions ("omnimeet.action.<name>") - and the gateway is those actions, the client handed to the ones that ask for it.
3 methods
GatewayFactoryInterfaceinterfaceBuilds a gateway from its options (an instance's address, a secret, a relay...).
2 methods
GatewayInterfaceinterfaceOne way to hold a meeting, configured - the two browsers themselves, or a conferencing service: the same questions for all of them. Each typed method is a shortcut for execute() with its request; a gateway that does not do something throws NotSupportedException, and supports() says so beforehand.
10 methods
RegistryclassThe application's gateways by name, each built once from its factory and options:
8 methods
ActionInterfaceinterfaceOne thing a gateway does: answers the requests it supports.
2 methods
ApiAwareInterfaceinterfaceAn action that works through the gateway's own client: a provider's API, a signer, a store.
1 method
ApiAwareTraittrait1 method
OmnimeetBundleclassOmnimeet in a Symfony application: the gateway packages installed (omnimeet/direct, omnimeet/jitsi) registered, the gateways built from configuration and injectable by their name:
2 methods
InvalidConfigExceptionclassA gateway misconfigured: an option missing, an unknown factory, a meeting not opened yet.
InvalidModelExceptionclassA model built with what it cannot hold: a meeting without a key or ending before it starts, a participant without an identifier, an access without its script or its address. An \InvalidArgumentException, as the models threw before.
InvalidNotificationExceptionclassA callback that is not the provider's: its signature does not hold, or it is too old.
NotSupportedExceptionclassThe gateway does not do that: no callbacks from two browsers talking to each other, no state read from a service that publishes none. supports() says so beforehand.
1 method
OmnimeetExceptioninterfaceEvery exception Omnimeet throws.
ProviderExceptionclassThe provider refused, or could not be reached.
1 method · 2 properties
AccessclassHow one participant enters one meeting - what Join answers, and what the page renders. It is made for that participant at that moment (temporary credentials, a signed token): asked again each time, never stored, never shown to anyone else.
7 methods · 8 properties
AccessKindenumThe three ways a gateway lets someone in.
3 cases
CapabilitiesclassWhat a gateway's meetings are, said before one is opened: how many people, through whom, with what. The operations it answers are asked of the gateway itself (supports()).
4 methods · 8 properties
EventenumWhat a provider's callback is about.
8 cases
MeetingclassA meeting, as the application describes it - its own key, when it starts and ends, a title - and, once a gateway opened it, as the gateway knows it: its reference there, where it stands, who is in. Whom it is for, who may enter and when is the application's business; nothing of it is here.
4 methods · 7 properties
NotificationclassWhat a provider told the application (a webhook), read as one event about one meeting, its signature checked.
1 method · 7 properties
ParticipantclassSomeone in a meeting, as little as a gateway needs: a role, the name shown to the others, and an identifier that says nothing by itself - never the application's account. A provider on the other side of the network sees exactly this, and no more.
4 methods · 4 properties
RoleenumWhat a participant is in a meeting.
2 cases
StatusenumWhere a meeting stands, as its gateway knows it.
2 methods · 5 cases
CloseclassClose a meeting: nobody gets in any more, what the gateway kept of it goes. Result: the Meeting, ENDED.
2 methods · 1 property
FetchclassThe meeting as the gateway has it now. Result: the Meeting with its status and who is in.
2 methods · 1 property
JoinclassLet one participant into an opened meeting. Result: the Access - an engine and its options, a frame, or an address - made for that participant, now. Whether they may enter at all was decided before, by the application.
2 methods · 2 properties
NotifyclassWhat the provider sent to the application's webhook: the raw body and the request's headers, for the signature. Result: the Notification, or InvalidNotificationException when the signature does not hold.
3 methods · 2 properties
OpenclassOpen a meeting on the gateway. Result: the Meeting with its reference there - what the application keeps to let people in, close and fetch.
2 methods · 1 property
RequestclassA question put to a gateway. The action that supports it answers by setting the result; the gateway hands the request back.
3 methods
Omnimeet
Config class
final class Config extends ArrayObject Config.php:13
A gateway's configuration while its factory builds it: the options given, the factory's defaults under them, and the keys that must be filled.
Config::defaults()
public function defaults(array $defaults): selfSets each key not set yet.
Config::validateNotEmpty()
public function validateNotEmpty(array $keys): voidConfig::get()
public function get(string $key, mixed $default = null): mixedConfig::list()
public function list(string $key): arrayA list given as one environment variable arrives as a single comma-separated string: split here, at run time.
Gateway class
final class Gateway implements GatewayInterface Gateway.php:15
A gateway's actions behind one door: the first action supporting a request answers it.
Gateway::__construct()
public function __construct(readonly string $name, readonly string $title, readonly Capabilities $capabilities, readonly array $actions)Gateway::getName()
public function getName(): stringGateway::getTitle()
public function getTitle(): stringGateway::capabilities()
public function capabilities(): CapabilitiesGateway::supports()
public function supports(string $request): boolGateway::execute()
public function execute(Request\Request $request): Request\RequestGateway::open()
public function open(Meeting $meeting): MeetingGateway::join()
public function join(Meeting $meeting, Participant $participant): AccessGateway::close()
public function close(Meeting $meeting): MeetingGateway::fetch()
public function fetch(Meeting $meeting): MeetingGateway::notify()
public function notify(string $body, array $headers = []): NotificationGatewayFactory class
abstract class GatewayFactory implements GatewayFactoryInterface GatewayFactory.php:20
The Omnibus way: a gateway's factory fills a Config - its name, title, capabilities, the options it needs, its client ("omnimeet.api", a closure of the Config: a provider's API, a token signer, a store) and its actions ("omnimeet.action.<name>") - and the gateway is those actions, the client handed to the ones that ask for it.
Nothing here calls anything: a factory whose provider is reached over HTTP takes its client in its own constructor.
GatewayFactory::getName()
public function getName(): stringGatewayFactory::create()
public function create(array $options = []): GatewayInterfaceGatewayFactory::createConfig()
public function createConfig(array $options = []): ConfigGatewayFactoryInterface interface
interface GatewayFactoryInterface GatewayFactoryInterface.php:6
Builds a gateway from its options (an instance's address, a secret, a relay...).
GatewayFactoryInterface::getName()
public function getName(): stringThe name gateways are configured with: "direct", "jitsi".
..
GatewayFactoryInterface::create()
public function create(array $options = []): GatewayInterfaceGatewayInterface interface
interface GatewayInterface GatewayInterface.php:22
One way to hold a meeting, configured - the two browsers themselves, or a conferencing service: the same questions for all of them. Each typed method is a shortcut for execute() with its request; a gateway that does not do something throws NotSupportedException, and supports() says so beforehand.
A gateway opens a room and lets someone in. It does not decide who may enter, nor when: the application did, before asking.
GatewayInterface::getName()
public function getName(): stringGatewayInterface::getTitle()
public function getTitle(): stringGatewayInterface::capabilities()
public function capabilities(): CapabilitiesWhat its meetings are: how many people, through whom, with what.
GatewayInterface::supports()
public function supports(string $request): boolGatewayInterface::execute()
public function execute(Request $request): Request- Returns
answered
- Throws
Exception\NotSupportedException
- Throws
Exception\ProviderException
GatewayInterface::open()
public function open(Meeting $meeting): MeetingOpen the meeting: it comes back with its reference on this gateway, to keep.
GatewayInterface::join()
public function join(Meeting $meeting, Participant $participant): AccessHow this participant enters the (opened) meeting, now: an engine, a frame or an address.
GatewayInterface::close()
public function close(Meeting $meeting): MeetingNobody gets in any more; what the gateway kept of the meeting goes.
GatewayInterface::fetch()
public function fetch(Meeting $meeting): MeetingThe meeting as the gateway has it now: its status, who is in.
GatewayInterface::notify()
public function notify(string $body, array $headers = []): NotificationWhat the provider is telling us (a webhook): checked against its signature, read as one event about one meeting.
- Throws
Exception\InvalidNotificationException when the signature does not hold
Registry class
final class Registry Registry.php:16
The application's gateways by name, each built once from its factory and options:
new Registry([new DirectGatewayFactory($signals), new JitsiGatewayFactory()], [ 'direct' => ['factory' => 'direct', 'options' => ['turn_secret' => '...', 'turn_urls' => ['turn:turn.example.org:3478']]], 'group' => ['factory' => 'jitsi', 'options' => ['domain' => 'meet.example.org']], ]);
Registry::__construct()
public function __construct(iterable $factories, readonly array $config)Registry::get()
public function get(string $name): GatewayInterfaceRegistry::has()
public function has(string $name): boolRegistry::options()
public function options(string $name): array- Returns
the options a gateway is configured with
Registry::create()
public function create(string $name, array $overrides = []): GatewayInterfaceA gateway built afresh, its configured options with $overrides over them - an instance typed in a back office, say. Not kept: get() still gives the configured one.
Registry::names()
public function names(): array- Returns
the configured gateways' names
Registry::all()
public function all(): arrayRegistry::factories()
public function factories(): array- Returns
the factories installed: what
factory:may name
Omnimeet\Action
ActionInterface interface
interface ActionInterface ActionInterface.php:8
One thing a gateway does: answers the requests it supports.
ActionInterface::supports()
public function supports(Request $request): boolActionInterface::execute()
public function execute(Request $request): voidSets the request's result, or throws an Omnimeet\Exception\OmnimeetException.
ApiAwareInterface interface
interface ApiAwareInterface ApiAwareInterface.php:6
An action that works through the gateway's own client: a provider's API, a signer, a store.
ApiAwareInterface::setApi()
public function setApi(object $api): voidApiAwareTrait trait
trait ApiAwareTrait ApiAwareTrait.php:10
ApiAwareTrait::setApi()
public function setApi(object $api): voidOmnimeet\Bridge\Symfony
OmnimeetBundle class
final class OmnimeetBundle extends AbstractBundle OmnimeetBundle.php:43
Omnimeet in a Symfony application: the gateway packages installed (omnimeet/direct, omnimeet/jitsi) registered, the gateways built from configuration and injectable by their name:
omnimeet: gateways: direct: factory: direct options: { turn_secret: '%env(TURN_SECRET)%', turn_urls: '%env(TURN_URLS)%' } group: factory: jitsi options: { domain: meet.example.org, app_id: '%env(JITSI_APP_ID)%', app_secret: '%env(JITSI_APP_SECRET)%' }
public function __construct(GatewayInterface $direct, GatewayInterface $group) }Nothing is built, nor checked, when the container compiles: a gateway is built the first time it is asked for, and an option left empty only shows then (InvalidConfigException).
A factory is autowired: what its constructor asks for - omnimeet/direct's SignalStoreInterface, an HTTP client - is the application's service of that type, when it has one. An application's own factories (a GatewayFactoryInterface) are registered too, autoconfigured.
OmnimeetBundle::configure()
public function configure(DefinitionConfigurator $definition): voidOmnimeetBundle::loadExtension()
public function loadExtension(array $config, ContainerConfigurator $container, ContainerBuilder $builder): voidOmnimeet\Exception
InvalidConfigException class
final class InvalidConfigException extends LogicException implements OmnimeetException InvalidConfigException.php:6
A gateway misconfigured: an option missing, an unknown factory, a meeting not opened yet.
InvalidModelException class
final class InvalidModelException extends InvalidArgumentException implements OmnimeetException InvalidModelException.php:11
A model built with what it cannot hold: a meeting without a key or ending before it starts, a participant without an identifier, an access without its script or its address. An \InvalidArgumentException, as the models threw before.
InvalidNotificationException class
final class InvalidNotificationException extends ProviderException InvalidNotificationException.php:6
A callback that is not the provider's: its signature does not hold, or it is too old.
NotSupportedException class
final class NotSupportedException extends LogicException implements OmnimeetException NotSupportedException.php:12
The gateway does not do that: no callbacks from two browsers talking to each other, no state read from a service that publishes none. supports() says so beforehand.
NotSupportedException::for()
public static function for(Request $request, string $gateway): selfOmnimeetException interface
interface OmnimeetException extends Throwable OmnimeetException.php:6
Every exception Omnimeet throws.
ProviderException class
class ProviderException extends RuntimeException implements OmnimeetException ProviderException.php:6
The provider refused, or could not be reached.
public readonly string $providerpublic readonly ?string $providerCodeThe provider's own error code, when it gave one
ProviderException::__construct()
public function __construct(public readonly string $provider, string $message, public readonly ?string $providerCode = null, ?\Throwable $previous = null)Omnimeet\Model
Access class
final readonly class Access Access.php:20
How one participant enters one meeting - what Join answers, and what the page renders. It is made for that participant at that moment (temporary credentials, a signed token): asked again each time, never stored, never shown to anyone else.
ENGINE $engine names a script of the gateway's package, $script is that file on disk (the application serves it), $options what the engine starts with; FRAME $url is the address to frame; when $engine and $script are set, that script drives the frame with $options instead; LINK $url is where to send the participant.
public AccessKind $kindpublic ?string $urlpublic ?string $enginethe name of the script: "direct", "jitsi"
public ?string $scriptits file, an absolute path inside the gateway's package
public array $optionswhat the script is started with: a JSON document
public array $originsthe third parties the participant's browser will talk to ("https://meet.example.org"): none when the call stays between the participants and the application
public array $permissionswhat the page or the frame needs from the browser: camera, microphone, display-capture
public ?\DateTimeImmutable $expiresAt
Access::__construct()
public function __construct(public AccessKind $kind, public ?string $url = null, public ?string $engine = null, public ?string $script = null, public array $options = [], public array $origins = [], public array $permissions = ['camera', 'microphone', 'display-capture'], public ?\DateTimeImmutable $expiresAt = null)$enginethe name of the script: "direct", "jitsi"
$scriptits file, an absolute path inside the gateway's package
$optionswhat the script is started with: a JSON document
$originsthe third parties the participant's browser will talk to ("https://meet.example.org"): none when the call stays between the participants and the application
$permissionswhat the page or the frame needs from the browser: camera, microphone, display-capture
Access::engine()
public static function engine(string $engine, string $script, array $options = [], ?\DateTimeImmutable $expiresAt = null): selfAccess::frame()
public static function frame(string $url, ?string $engine = null, ?string $script = null, array $options = [], ?array $origins = null, ?\DateTimeImmutable $expiresAt = null): self$originsthe address's own origin when left out
Access::link()
public static function link(string $url, ?\DateTimeImmutable $expiresAt = null): selfAccess::isThirdParty()
public function isThirdParty(): boolAccess::isExpired()
public function isExpired(?\DateTimeInterface $now = null): boolAccess::allow()
public function allow(): stringThe frame's allow attribute: "camera; microphone; display-capture".
AccessKind enum
enum AccessKind AccessKind.php:6
The three ways a gateway lets someone in.
case ENGINE = 'engine'The page runs a JavaScript engine of the gateway's package, on the page's own markup.
case FRAME = 'frame'The page frames the provider's own interface, and may drive it through a script.
case LINK = 'link'The participant is sent to an address: nothing is embedded.
Capabilities class
final readonly class Capabilities Capabilities.php:10
What a gateway's meetings are, said before one is opened: how many people, through whom, with what. The operations it answers are asked of the gateway itself (supports()).
public ?int $maxParticipantshow many people one meeting takes; null: the provider's own limit, not known here
public bool $thirdPartywhether anyone but the participants and the application carries or sees the call
public bool $endToEndwhether the media are encrypted from one participant to the other, with nobody in between able to read them
public bool $recordingwhether the gateway can record a meeting
public bool $screenSharingpublic bool $chatpublic bool $tokenswhether each participant enters with a credential made for them
public array $accesshow it lets someone in
Capabilities::__construct()
public function __construct(public ?int $maxParticipants = null, public bool $thirdParty = true, public bool $endToEnd = false, public bool $recording = false, public bool $screenSharing = false, public bool $chat = false, public bool $tokens = false, public array $access = [])$maxParticipantshow many people one meeting takes; null: the provider's own limit, not known here
$thirdPartywhether anyone but the participants and the application carries or sees the call
$endToEndwhether the media are encrypted from one participant to the other, with nobody in between able to read them
$recordingwhether the gateway can record a meeting
$tokenswhether each participant enters with a credential made for them
$accesshow it lets someone in
Capabilities::takes()
public function takes(int $participants): boolCapabilities::letsInBy()
public function letsInBy(AccessKind $kind): boolCapabilities::toArray()
public function toArray(): arrayEvent enum
enum Event Event.php:6
What a provider's callback is about.
case OPENED = 'opened'The meeting started on the provider's side: its first participant came in.
case JOINED = 'joined'case LEFT = 'left'case ENDED = 'ended'The meeting is over on the provider's side: its last participant left, or it was ended.
case RECORDING_STARTED = 'recording_started'case RECORDING_ENDED = 'recording_ended'case RECORDING_READY = 'recording_ready'A recording can be fetched: Notification::$data has its address.
case OTHER = 'other'Anything else the provider says: Notification::$type has its own word for it.
Meeting class
final readonly class Meeting Meeting.php:14
A meeting, as the application describes it - its own key, when it starts and ends, a title - and, once a gateway opened it, as the gateway knows it: its reference there, where it stands, who is in. Whom it is for, who may enter and when is the application's business; nothing of it is here.
public string $keythe application's name for it: unguessable when it may reach a third party ("appointment:12" tells and can be guessed; a random token does neither)
public ?\DateTimeImmutable $startsAtpublic ?\DateTimeImmutable $endsAtpublic ?string $titleshown by a provider that shows one; null says nothing of what the meeting is about
public ?string $referencethe gateway's name for it, once opened: what is kept to join, close and fetch
public Status $statuspublic array $presentwho is in, when the gateway can tell (Fetch)
Meeting::__construct()
public function __construct(public string $key, public ?\DateTimeImmutable $startsAt = null, public ?\DateTimeImmutable $endsAt = null, public ?string $title = null, public ?string $reference = null, public Status $status = Status::PLANNED, public array $present = [])$keythe application's name for it: unguessable when it may reach a third party ("appointment:12" tells and can be guessed; a random token does neither)
$titleshown by a provider that shows one; null says nothing of what the meeting is about
$referencethe gateway's name for it, once opened: what is kept to join, close and fetch
$presentwho is in, when the gateway can tell (Fetch)
Meeting::with()
public function with(?string $reference = null, ?Status $status = null, ?array $present = null): selfThe same meeting as its gateway has it now.
Meeting::isOpened()
public function isOpened(): boolMeeting::reference()
public function reference(): stringThe gateway's reference, which only an opened meeting has.
Notification class
final readonly class Notification Notification.php:9
What a provider told the application (a webhook), read as one event about one meeting, its signature checked.
public Event $eventpublic string $typethe provider's own name for the event
public ?string $referencethe meeting, as Open named it
public ?Participant $participantpublic ?\DateTimeImmutable $atpublic ?string $idthe same for a callback sent twice: what to deduplicate on
public array $datathe provider's payload
Notification::__construct()
public function __construct(public Event $event, public string $type, public ?string $reference = null, public ?Participant $participant = null, public ?\DateTimeImmutable $at = null, public ?string $id = null, public array $data = [])$typethe provider's own name for the event
$referencethe meeting, as Open named it
$idthe same for a callback sent twice: what to deduplicate on
$datathe provider's payload
Participant class
final readonly class Participant Participant.php:13
Someone in a meeting, as little as a gateway needs: a role, the name shown to the others, and an identifier that says nothing by itself - never the application's account. A provider on the other side of the network sees exactly this, and no more.
public string $idopaque and stable for the meeting: "u42", a hash - what the application can find its own account by
public Role $rolepublic ?string $nameshown to the other participants; null: the gateway's own default, or none
public ?string $localethe language of the provider's interface, when it has one: "fr", "de"
Participant::__construct()
public function __construct(public string $id, public Role $role = Role::GUEST, public ?string $name = null, public ?string $locale = null)$idopaque and stable for the meeting: "u42", a hash - what the application can find its own account by
$nameshown to the other participants; null: the gateway's own default, or none
$localethe language of the provider's interface, when it has one: "fr", "de"
Participant::host()
public static function host(string $id, ?string $name = null, ?string $locale = null): selfParticipant::guest()
public static function guest(string $id, ?string $name = null, ?string $locale = null): selfParticipant::isHost()
public function isHost(): boolRole enum
enum Role Role.php:6
What a participant is in a meeting.
case HOST = 'host'Whoever holds the meeting: starts it, ends it, moderates it where the gateway has moderators.
case GUEST = 'guest'Whoever is received.
Status enum
enum Status Status.php:6
Where a meeting stands, as its gateway knows it.
case PLANNED = 'planned'Described, not opened on a gateway yet: it has no reference.
case OPEN = 'open'Opened: participants may be let in. Nobody is talking yet, as far as the gateway knows.
case LIVE = 'live'At least two participants are connected to each other.
case ENDED = 'ended'Closed: nobody gets in any more.
case UNKNOWN = 'unknown'The gateway cannot tell.
Status::isOver()
public function isOver(): boolStatus::admits()
public function admits(): boolWhether a participant may still be let in.
Omnimeet\Request
Close class
final class Close extends Request Close.php:11
Close a meeting: nobody gets in any more, what the gateway kept of it goes. Result: the Meeting, ENDED.
public readonly Meeting $meeting
Close::__construct()
public function __construct(public readonly Meeting $meeting)Close::getMeeting()
public function getMeeting(): ?MeetingFetch class
final class Fetch extends Request Fetch.php:11
The meeting as the gateway has it now. Result: the Meeting with its status and who is in.
public readonly Meeting $meeting
Fetch::__construct()
public function __construct(public readonly Meeting $meeting)Fetch::getMeeting()
public function getMeeting(): ?MeetingJoin class
final class Join extends Request Join.php:15
Let one participant into an opened meeting. Result: the Access - an engine and its options, a frame, or an address - made for that participant, now. Whether they may enter at all was decided before, by the application.
public readonly Meeting $meetingpublic readonly Participant $participant
Join::__construct()
public function __construct(public readonly Meeting $meeting, public readonly Participant $participant)Join::getAccess()
public function getAccess(): ?AccessNotify class
final class Notify extends Request Notify.php:12
What the provider sent to the application's webhook: the raw body and the request's headers, for the signature. Result: the Notification, or InvalidNotificationException when the signature does not hold.
public readonly string $bodypublic readonly array $headers
Notify::__construct()
public function __construct(public readonly string $body, public readonly array $headers = [])Notify::header()
public function header(string $name): ?stringA header, whatever the case it came in.
Notify::getNotification()
public function getNotification(): ?NotificationOpen class
final class Open extends Request Open.php:12
Open a meeting on the gateway. Result: the Meeting with its reference there - what the application keeps to let people in, close and fetch.
Opening the same meeting (the same key) twice gives the same reference.
public readonly Meeting $meeting
Open::__construct()
public function __construct(public readonly Meeting $meeting)Open::getMeeting()
public function getMeeting(): ?MeetingRequest class
abstract class Request Request.php:9
A question put to a gateway. The action that supports it answers by setting the result; the gateway hands the request back.
Request::setResult()
public function setResult(mixed $result): voidRequest::getResult()
public function getResult(): mixedRequest::isAnswered()
public function isAnswered(): bool