ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
Letter.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2
4
7
8class Letter extends Avatar implements C\Symbol\Avatar\Letter
9{
10 public function getAbbreviation() : string
11 {
12 return (substr($this->getUsername(), 0, 2));
13 }
14
15 public function getBackgroundColorVariant() : int
16 {
17 return (crc32($this->getUsername()) % 26) + 1;
18 }
19}
An exception for terminatinating execution or to throw for unit testing.