Skip to content

omnibase/broadcast API reference

Floor
Prepared structure · Omnibase
Version
main
Verified for real
Its README does not say
Licence
MIT
composer require omnibase/broadcast:dev-main

Read from the package's own PHP files at the commit a721353a6494: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.

Base\Broadcast

  • BroadcastBundle class

    A broadcast's site: a programme, its episodes, and for each film of an episode (omnibase/video) what it is - a performance: who (omnibase/music's performers), which song, a cover or not. Written for one music show; no more general than it needed.

    3 methods

Base\Broadcast\Admin\Widget

  • BroadcastWidgetType class

    The dashboard's tile: the titles the import did not understand (`MenuItem::block('broadcast_unrecognised', ...)`).

    4 methods

Base\Broadcast\Controller\Admin\Crud

  • EpisodeCrudController class

    The episodes: number, date, picture. They come from the import; the administrators correct them.

    5 methods

  • PerformanceCrudController class

    What each film is. The filter "recognised: no" lists the lives whose title the import did not understand: the administrators give them their song and their artists here.

    5 methods

  • ProfileCrudController class

    The artists' pages: their address, their story, their picture (the artist itself is omnibase/music's Performer).

    4 methods

  • ProgrammeCrudController class

    4 methods

  • SongCrudController class

    4 methods

Base\Broadcast\Controller\Client

  • BroadcastController class

    The show's pages: its episodes by year, one episode (the whole show and the order of passage), the artists, one artist, one song and every version of it played on stage, the covers and the duets.

    10 methods

Base\Broadcast\DependencyInjection

Base\Broadcast\Entity

  • Episode class

    One broadcast of the programme: its number, the day it aired, its picture, the whole show as one film when there is one, and what was played, in order (its performances).

    20 methods

  • Performance class

    What one film of an episode is: a song played live (by whom, a cover or their own, a duet), an interview, the whole show, a bonus. The film is omnibase/video's; the people are omnibase/music's performers.

    23 methods · 5 constants

  • Profile class

    An artist's page on the site. The artist is omnibase/music's Performer (a name, a kind); this is what a page of their own adds: its address, their story, their picture.

    13 methods

  • Programme class

    The show: its name, what it says of itself, the channel its films are on.

    11 methods

  • Song class

    A song as it was played on stage, whoever played it: its title and, when it is somebody else's, who made it known. Its page gathers every version.

    9 methods

Base\Broadcast\Model

  • ParsedTitle class

    What Service\TitleParser read in a film's title.

    4 methods · 8 properties

Base\Broadcast\Repository

Base\Broadcast\Service

  • Catalogue class

    The artists and the songs, found by their names or made: one Performer (omnibase/music) and its Profile for "Jean-Louis Aubert" however often he comes; one Song for a title and who made it known, whoever sings it.

    5 methods

  • TitleParser class

    A film's title as the show writes it, read:

    3 methods

Base\Broadcast\Suggest

  • BroadcastAffinity class

    What makes two films of a show close, for omnibase/video's suggestions: the same artist (as strong as the same channel: 3) and the same episode (as strong as the same list: 2).

    2 methods

Base\Broadcast\Twig

  • BroadcastExtension class

    broadcast_performance(video) what a film is (its episode, its song, its artists), or null broadcast_profiles(performers) performer id => its page (Profile), for links to the artists

    2 methods

Base\Broadcast

BroadcastBundle class

class BroadcastBundle extends AbstractBaseBundle BroadcastBundle.php:15

A broadcast's site: a programme, its episodes, and for each film of an episode (omnibase/video) what it is - a performance: who (omnibase/music's performers), which song, a cover or not. Written for one music show; no more general than it needed.

BroadcastBundle::__construct()

public function __construct()

BroadcastBundle::getPath()

public function getPath(): string

BroadcastBundle::build()

public function build(ContainerBuilder $container): void

Base\Broadcast\Admin\Widget

BroadcastWidgetType class

final class BroadcastWidgetType implements DashboardWidgetTypeInterface BroadcastWidgetType.php:12

The dashboard's tile: the titles the import did not understand (MenuItem::block('broadcast_unrecognised', ...)).

BroadcastWidgetType::__construct()

public function __construct(readonly PerformanceRepository $performances, readonly EntityManagerInterface $entityManager)

BroadcastWidgetType::getName()

public static function getName(): string

BroadcastWidgetType::getTemplate()

public function getTemplate(): string

BroadcastWidgetType::getTemplateVars()

public function getTemplateVars(MenuItem $widget): array

Base\Broadcast\Controller\Admin\Crud

EpisodeCrudController class

class EpisodeCrudController extends AbstractCrudController EpisodeCrudController.php:17

The episodes: number, date, picture. They come from the import; the administrators correct them.

EpisodeCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

EpisodeCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

EpisodeCrudController::configureFields()

public function configureFields(string $pageName): iterable

EpisodeCrudController::configureActions()

public function configureActions(Actions $actions): Actions

EpisodeCrudController::createEntity()

public function createEntity(string $entityFqcn): object

PerformanceCrudController class

class PerformanceCrudController extends AbstractCrudController PerformanceCrudController.php:21

What each film is. The filter "recognised: no" lists the lives whose title the import did not understand: the administrators give them their song and their artists here.

PerformanceCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

PerformanceCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

PerformanceCrudController::configureFilters()

public function configureFilters(Filters $filters): Filters

PerformanceCrudController::configureFields()

public function configureFields(string $pageName): iterable

PerformanceCrudController::configureActions()

public function configureActions(Actions $actions): Actions

ProfileCrudController class

class ProfileCrudController extends AbstractCrudController ProfileCrudController.php:15

The artists' pages: their address, their story, their picture (the artist itself is omnibase/music's Performer).

ProfileCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

ProfileCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

ProfileCrudController::configureFields()

public function configureFields(string $pageName): iterable

ProfileCrudController::configureActions()

public function configureActions(Actions $actions): Actions

ProgrammeCrudController class

class ProgrammeCrudController extends AbstractCrudController ProgrammeCrudController.php:14

ProgrammeCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

ProgrammeCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

ProgrammeCrudController::configureFields()

public function configureFields(string $pageName): iterable

ProgrammeCrudController::configureActions()

public function configureActions(Actions $actions): Actions

SongCrudController class

class SongCrudController extends AbstractCrudController SongCrudController.php:12

SongCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

SongCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

SongCrudController::configureFields()

public function configureFields(string $pageName): iterable

SongCrudController::configureActions()

public function configureActions(Actions $actions): Actions

Base\Broadcast\Controller\Client

BroadcastController class

class BroadcastController extends AbstractController BroadcastController.php:23

The show's pages: its episodes by year, one episode (the whole show and the order of passage), the artists, one artist, one song and every version of it played on stage, the covers and the duets.

BroadcastController::__construct()

public function __construct(readonly EpisodeRepository $episodes, readonly PerformanceRepository $performances, readonly ProfileRepository $profiles, readonly SongRepository $songs, readonly ?ProgrammeRepository $programmes = null, readonly ?string $programme = null)

BroadcastController::episodes()

public function episodes(Request $request): Response

BroadcastController::episode()

public function episode(int $number): Response

BroadcastController::artists()

public function artists(): Response

BroadcastController::artist()

public function artist(string $slug): Response

BroadcastController::songs()

public function songs(): Response

BroadcastController::song()

public function song(string $slug): Response

BroadcastController::covers()

public function covers(): Response

BroadcastController::duets()

public function duets(): Response

BroadcastController::decades()

public static function decades(array $years): array
Returns

decade (1990) => its years, the latest decade first

Base\Broadcast\DependencyInjection

BroadcastConfiguration class

class BroadcastConfiguration extends AbstractBaseConfiguration BroadcastConfiguration.php:8

BroadcastConfiguration::getConfigTreeBuilder()

public function getConfigTreeBuilder(): TreeBuilder

BroadcastExtension class

class BroadcastExtension extends AbstractBaseExtension BroadcastExtension.php:11

BroadcastExtension::getConfiguration()

public function getConfiguration(array $config, ContainerBuilder $container): BroadcastConfiguration

BroadcastExtension::load()

public function load(array $configs, ContainerBuilder $container): void

Base\Broadcast\Entity

Episode class

class Episode Episode.php:16

One broadcast of the programme: its number, the day it aired, its picture, the whole show as one film when there is one, and what was played, in order (its performances).

Episode::__construct()

public function __construct(Programme $programme, int $number)

Episode::__toString()

public function __toString(): string

Episode::getId()

public function getId(): ?int

Episode::getProgramme()

public function getProgramme(): Programme

Episode::getNumber()

public function getNumber(): int

Episode::getTitle()

public function getTitle(): ?string

Episode::setTitle()

public function setTitle(?string $title): self

Episode::getAiredAt()

public function getAiredAt(): ?\DateTimeInterface

Episode::setAiredAt()

public function setAiredAt(?\DateTimeInterface $airedAt): self

Episode::getYear()

public function getYear(): ?int

Episode::getImage()

public function getImage(): ?string

Episode::setImage()

public function setImage(?string $image): self

Episode::getFull()

public function getFull(): ?Video

Episode::setFull()

public function setFull(?Video $full): self

Episode::getOrigin()

public function getOrigin(): ?string

Episode::setOrigin()

public function setOrigin(?string $origin): self

Episode::getPerformances()

public function getPerformances(): Collection

Episode::addPerformance()

public function addPerformance(Performance $performance): self

Episode::getByKind()

public function getByKind(string ...$kinds): array
Returns

the performances of one kind (Performance::LIVE...), in order

Episode::getPerformers()

public function getPerformers(): array
Returns

who was on stage, once each, in order of appearance

Performance class

class Performance Performance.php:17

What one film of an episode is: a song played live (by whom, a cover or their own, a duet), an interview, the whole show, a bonus. The film is omnibase/video's; the people are omnibase/music's performers.

const LIVE = 'live'
const INTERVIEW = 'interview'
const FULL = 'full'
const BONUS = 'bonus'
const KINDS = [self::LIVE, self::INTERVIEW, self::FULL, self::BONUS]

Performance::__construct()

public function __construct(Episode $episode, Video $video, string $kind = self::LIVE, int $position = 0)

Performance::__toString()

public function __toString(): string

Performance::getId()

public function getId(): ?int

Performance::getEpisode()

public function getEpisode(): Episode

Performance::getVideo()

public function getVideo(): Video

Performance::getPosition()

public function getPosition(): int

Performance::setPosition()

public function setPosition(int $position): self

Performance::getKind()

public function getKind(): string

Performance::setKind()

public function setKind(string $kind): self

Performance::isLive()

public function isLive(): bool

Performance::getSong()

public function getSong(): ?Song

Performance::setSong()

public function setSong(?Song $song): self

Performance::isCover()

public function isCover(): bool

Performance::setCover()

public function setCover(bool $cover): self

Performance::isDuet()

public function isDuet(): bool

Two artists or more on one song.

Performance::getPerformers()

public function getPerformers(): Collection

Performance::addPerformer()

public function addPerformer(Performer $performer): self

Performance::removePerformer()

public function removePerformer(Performer $performer): self

Performance::getBilling()

public function getBilling(): string

"Jean-Louis Aubert / Santa"

Performance::getRawTitle()

public function getRawTitle(): ?string

Performance::setRawTitle()

public function setRawTitle(?string $rawTitle): self

Performance::isRecognised()

public function isRecognised(): bool

Performance::setRecognised()

public function setRecognised(bool $recognised): self

Profile class

class Profile Profile.php:14

An artist's page on the site. The artist is omnibase/music's Performer (a name, a kind); this is what a page of their own adds: its address, their story, their picture.

Profile::__construct()

public function __construct(Performer $performer, string $slug)

Profile::__toString()

public function __toString(): string

Profile::getId()

public function getId(): ?int

Profile::getPerformer()

public function getPerformer(): Performer

Profile::getName()

public function getName(): string

Profile::getSlug()

public function getSlug(): string

Profile::setSlug()

public function setSlug(string $slug): self

Profile::getBiography()

public function getBiography(): ?string

Profile::setBiography()

public function setBiography(?string $biography): self

Profile::getImage()

public function getImage(): ?string

Profile::setImage()

public function setImage(?string $image): self

Profile::isLooked()

public function isLooked(): bool

Profile::setLooked()

public function setLooked(bool $looked): self

Programme class

class Programme Programme.php:10

The show: its name, what it says of itself, the channel its films are on.

Programme::__construct()

public function __construct(?string $name = null, ?string $slug = null)

Programme::__toString()

public function __toString(): string

Programme::getId()

public function getId(): ?int

Programme::getSlug()

public function getSlug(): ?string

Programme::setSlug()

public function setSlug(?string $slug): self

Programme::getName()

public function getName(): ?string

Programme::setName()

public function setName(?string $name): self

Programme::getDescription()

public function getDescription(): ?string

Programme::setDescription()

public function setDescription(?string $description): self

Programme::getChannel()

public function getChannel(): ?Channel

Programme::setChannel()

public function setChannel(?Channel $channel): self

Song class

class Song Song.php:12

A song as it was played on stage, whoever played it: its title and, when it is somebody else's, who made it known. Its page gathers every version.

Song::__construct()

public function __construct(?string $title = null, ?string $originalArtist = null, ?string $slug = null)

Song::__toString()

public function __toString(): string

Song::getId()

public function getId(): ?int

Song::getSlug()

public function getSlug(): ?string

Song::setSlug()

public function setSlug(?string $slug): self

Song::getTitle()

public function getTitle(): ?string

Song::setTitle()

public function setTitle(?string $title): self

Song::getOriginalArtist()

public function getOriginalArtist(): ?string

Song::setOriginalArtist()

public function setOriginalArtist(?string $originalArtist): self

Base\Broadcast\Model

ParsedTitle class

final class ParsedTitle ParsedTitle.php:8

What Service\TitleParser read in a film's title.

public readonly string $raw
public readonly string $kind
public readonly array $artists

in the order of the billing

public readonly ?string $song
public readonly ?string $originalArtist
public readonly ?int $year
public readonly array $notes

what else stood in brackets ("Inédit à la TV")

public readonly bool $recognised

ParsedTitle::__construct()

public function __construct(public readonly string $raw, public readonly string $kind, public readonly array $artists = [], public readonly ?string $song = null, public readonly ?string $originalArtist = null, public readonly ?int $year = null, public readonly array $notes = [], public readonly bool $recognised = true)
$artists

in the order of the billing

$notes

what else stood in brackets ("Inédit à la TV")

ParsedTitle::isLive()

public function isLive(): bool

ParsedTitle::isCover()

public function isCover(): bool

Somebody else's song: an original artist named who is not on stage.

ParsedTitle::isDuet()

public function isDuet(): bool

Base\Broadcast\Repository

EpisodeRepository class

class EpisodeRepository extends ServiceEntityRepository EpisodeRepository.php:11

EpisodeRepository::__construct()

public function __construct(ManagerRegistry $registry)

EpisodeRepository::findOneByNumber()

public function findOneByNumber(int $number, ?\Base\Broadcast\Entity\Programme $programme = null): ?Episode

The episode of that number in a programme: a number is unique within one programme only. Null: in any programme (the first found).

EpisodeRepository::findLatest()

public function findLatest(int $limit = 12, int $offset = 0): array
Returns

the last aired first

EpisodeRepository::findByYear()

public function findByYear(int $year): array

EpisodeRepository::countByYear()

public function countByYear(): array
Returns

year => episodes, the latest year first

EpisodeRepository::findAnniversary()

public function findAnniversary(int $years = 30, ?\DateTimeInterface $today = null, int $days = 3): array

"Il y a trente ans cette semaine": the episodes aired $years years ago, within three days of today's date - or, when none was, the closest one of that year.

PerformanceRepository class

class PerformanceRepository extends ServiceEntityRepository PerformanceRepository.php:15

PerformanceRepository::__construct()

public function __construct(ManagerRegistry $registry)

PerformanceRepository::findOneForVideo()

public function findOneForVideo(Video $video): ?Performance

PerformanceRepository::findForPerformer()

public function findForPerformer(Performer $performer, array $kinds = [Performance::LIVE], int $limit = 200): array
Returns

an artist's, the latest first; $kinds: live, interview...

PerformanceRepository::findForSong()

public function findForSong(Song $song): array
Returns

every version of a song played on stage, the first one first

PerformanceRepository::findCovers()

public function findCovers(int $limit = 12): array
Returns

the covers, the most seen first

PerformanceRepository::findDuets()

public function findDuets(int $limit = 12): array
Returns

the duets, the most seen first

PerformanceRepository::findUnrecognised()

public function findUnrecognised(int $limit = 50): array
Returns

the lives whose title was not understood

PerformanceRepository::countUnrecognised()

public function countUnrecognised(): int

PerformanceRepository::findGroups()

public function findGroups(array $videoIds): array

For the suggestions: each film's artists and episode.

ProfileRepository class

class ProfileRepository extends ServiceEntityRepository ProfileRepository.php:11

ProfileRepository::__construct()

public function __construct(ManagerRegistry $registry)

ProfileRepository::findOneFor()

public function findOneFor(Performer $performer): ?Profile

ProfileRepository::findAllByName()

public function findAllByName(): array
Returns

every artist, by name

ProfileRepository::findFor()

public function findFor(iterable $performers): array
Returns

performer id => profile

ProgrammeRepository class

class ProgrammeRepository extends ServiceEntityRepository ProgrammeRepository.php:10

ProgrammeRepository::__construct()

public function __construct(ManagerRegistry $registry)

ProgrammeRepository::findCurrent()

public function findCurrent(?string $slug = null): ?Programme

The site's programme: the one named, or the first.

SongRepository class

class SongRepository extends ServiceEntityRepository SongRepository.php:11

SongRepository::__construct()

public function __construct(ManagerRegistry $registry)

SongRepository::findWithSeveralVersions()

public function findWithSeveralVersions(int $limit = 24): array

The songs played more than once on stage, the most played first.

Base\Broadcast\Service

Catalogue class

class Catalogue Catalogue.php:18

The artists and the songs, found by their names or made: one Performer (omnibase/music) and its Profile for "Jean-Louis Aubert" however often he comes; one Song for a title and who made it known, whoever sings it.

What it makes in one run is remembered, so nothing is made twice before the flush.

Catalogue::__construct()

public function __construct(readonly EntityManagerInterface $entityManager)

Catalogue::slug()

public static function slug(string $text): string

Catalogue::artist()

public function artist(string $name): Profile

Catalogue::song()

public function song(string $title, ?string $originalArtist = null): Song

The song of that title. The same title by another original artist is another song; a version that does not say whose it is joins the one that exists.

Catalogue::reset()

public function reset(): void

Forget what was remembered (after an EntityManager::clear()).

TitleParser class

class TitleParser TitleParser.php:26

A film's title as the show writes it, read:

Artiste A / Artiste B "Chanson" (Interprète d'origine) (Année)

gives the artists in their billing order, the song, who made it known (so: a cover, when they are not on stage), the year; two artists or more are a duet. Also read: Interview A / B (1993), Taratata Extra : A "Chanson" (2024) (a bonus, with its song), a medley ("Ta Main" / "Toi + Moi"), brackets inside a title ("(Sittin' On) The Dock Of The Bay"), a note that is no artist ((Inédit à la TV)), a bracket left open ((1993), a quote left open ("Caravane (2025)).

The section the film is filed under (Live, Interview, Extra, Backstage, Teaser...) says its kind. A live whose title has no song in quotes is not recognised: it keeps the artists it was filed under and is listed in the back office.

TitleParser::parse()

public function parse(string $title, ?string $section = null, array $filedUnder = []): ParsedTitle
$filedUnder

the artists the film is filed under, when its title does not name them

TitleParser::kind()

public static function kind(?string $section, string $title = ''): string

TitleParser::artists()

public static function artists(string $text): array
Returns

"A / B" in the order written, once each

Base\Broadcast\Suggest

BroadcastAffinity class

final class BroadcastAffinity implements AffinityInterface BroadcastAffinity.php:13

What makes two films of a show close, for omnibase/video's suggestions: the same artist (as strong as the same channel: 3) and the same episode (as strong as the same list: 2).

BroadcastAffinity::__construct()

public function __construct(readonly PerformanceRepository $performances)

BroadcastAffinity::groups()

public function groups(array $videos): array

Base\Broadcast\Twig

BroadcastExtension class

class BroadcastExtension extends AbstractExtension BroadcastExtension.php:17

broadcast_performance(video) what a film is (its episode, its song, its artists), or null broadcast_profiles(performers) performer id => its page (Profile), for links to the artists

BroadcastExtension::__construct()

public function __construct(readonly PerformanceRepository $performances, readonly ProfileRepository $profiles)

BroadcastExtension::getFunctions()

public function getFunctions(): array