ILIAS  release_8 Revision v8.24
Css.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
21
22use LogicException;
23
29{
30 public const MEDIA_ALL = "all";
31 public const MEDIA_SCREEN = "screen";
32 public const MEDIA_PRINT = "print";
33 public const MEDIA_SPEECH = "speech";
34
35 private string $media = self::MEDIA_SCREEN;
36
42 public function __construct(string $content, string $version, string $media = self::MEDIA_SCREEN)
43 {
44 if (!in_array($media, [self::MEDIA_ALL, self::MEDIA_PRINT, self::MEDIA_SCREEN, self::MEDIA_SPEECH])) {
45 throw new LogicException("Invalid media type for CSS");
46 }
48 $this->media = $media;
49 }
50
54 public function getMedia(): string
55 {
56 return $this->media;
57 }
58}
__construct(string $content, string $version, string $media=self::MEDIA_SCREEN)
Css constructor.
Definition: Css.php:42
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...