ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
Css.php
Go to the documentation of this file.
2
3use LogicException;
4
5/******************************************************************************
6 * This file is part of ILIAS, a powerful learning management system.
7 * ILIAS is licensed with the GPL-3.0, you should have received a copy
8 * of said license along with the source code.
9 * If this is not the case or you just want to try ILIAS, you'll find
10 * us at:
11 * https://www.ilias.de
12 * https://github.com/ILIAS-eLearning
13 *****************************************************************************/
14
21{
22 const MEDIA_ALL = "all";
23 const MEDIA_SCREEN = "screen";
24 const MEDIA_PRINT = "print";
25 const MEDIA_SPEECH = "speech";
30
31
38 public function __construct(string $content, string $version, string $media = self::MEDIA_SCREEN)
39 {
40 if (!in_array($media, [self::MEDIA_ALL, self::MEDIA_PRINT, self::MEDIA_SCREEN, self::MEDIA_SPEECH])) {
41 throw new LogicException("Invalid media type for CSS");
42 }
44 $this->media = $media;
45 }
46
47
51 public function getMedia() : string
52 {
53 return $this->media;
54 }
55}
An exception for terminatinating execution or to throw for unit testing.
__construct(string $content, string $version, string $media=self::MEDIA_SCREEN)
Css constructor.
Definition: Css.php:38
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc