ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 );
15
21 public function getVerificationTypeByType(string $type) : string
22 {
23 if (false === $this->typeExistsInMap($type)) {
24 throw new ilException('The given type ' . $type . 'is not mapped as a verification type on the class map');
25 }
26
27 return $this->map[$type];
28 }
29
34 private function typeExistsInMap(string $type) : bool
35 {
36 return array_key_exists($type, $this->map);
37 }
38}
An exception for terminatinating execution or to throw for unit testing.
Base class for ILIAS Exception handling.
$type