ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilCertificateVerificationClassMap.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
3
8{
9 private $map = array(
10 'crs' => 'crsv',
11 'tst' => 'tstv',
12 'exc' => 'excv',
13 'sahs' => 'scov',
14 'cmix' => 'cmxv',
15 'lti' => 'ltiv'
16 );
17
23 public function getVerificationTypeByType(string $type) : string
24 {
25 if (false === $this->typeExistsInMap($type)) {
26 throw new ilException('The given type ' . $type . 'is not mapped as a verification type on the class map');
27 }
28
29 return $this->map[$type];
30 }
31
36 private function typeExistsInMap(string $type) : bool
37 {
38 return array_key_exists($type, $this->map);
39 }
40}
An exception for terminatinating execution or to throw for unit testing.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$type