ILIAS  release_8 Revision v8.24
DICMemberMap.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\CI\Rector\DIC;
22
24{
25 public const TPL = 'tpl';
26 protected array $map = [];
27
28 public function __construct()
29 {
30 $tpl = new DICMember(
31 self::TPL,
32 \ilGlobalTemplateInterface::class,
33 ['ui', 'mainTemplate'],
34 'main_tpl'
35 );
36 $tpl->setAlternativeClasses([\ilTemplate::class, \ilGlobalTemplate::class, \ilGlobalPageTemplate::class]);
37 $this->map[self::TPL] = $tpl;
38 }
39
40 public function getByName(string $name): DICMember
41 {
42 if (!isset($this->map[$name])) {
43 throw new \InvalidArgumentException("The dependency '$name' is currently not configured");
44 }
45 return $this->map[$name];
46 }
47}
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
if($format !==null) $name
Definition: metadata.php:247