ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
HasContentLanguage.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
22 
24 
26 {
27  protected ?LanguageTag $content_language = null;
28 
29  public function withContentLanguage(LanguageTag $content_language): self
30  {
31  $clone = clone $this;
32  $clone->content_language = $content_language;
33  return $clone;
34  }
35 
36  public function getContentLanguage(): ?LanguageTag
37  {
38  return $this->content_language;
39  }
40 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a valid language tag that should be used instead of plain strings.
Definition: LanguageTag.php:39
withContentLanguage(LanguageTag $content_language)