Defines a contract for naming and namespacing Centrifugo channels in a Symfony app.
// Source: https://github.com/metadist/synaplan | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
<?php
declare(strict_types=1);
namespace App\Realtime\Channel;
/**
* Strongly-typed identifier for a Centrifugo channel.
*
* The channel name format is `{namespace}:{identifier}` and MUST match the
* namespace declared in `_docker/centrifugo/config.json`. Adding a new
* realtime feature is a 3-step process:
*
* 1. Implement this interface (one class per channel shape).
* 2. Implement {@see \App\Realtime\Authorizer\ChannelAuthorizerInterface}
* with `#[AutoconfigureTag('app.realtime.authorizer', ['namespace' => '...'])]`.
* 3. Add the namespace block in centrifugo
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key