3 declare(strict_types=1);
    38         return $this->getCanonicalNameByFullyQualifiedName();
    44     protected function getCanonicalNameByFullyQualifiedName(): string
    46         $cls = explode(
"\\", get_class($this));
    48         $cur = array_pop($cls);
    49         while ($cur !== 
"Component" && count($cls) > 0) {
    50             $name[] = preg_replace(
"%([a-z])([A-Z])%", 
"$1 $2", $cur);
    51             $cur = array_pop($cls);
    53         return implode(
" ", $name);
    61     protected function checkArg(
string $which, 
bool $check, 
string $message): void
    74     protected function checkStringArg(
string $which, $value): void
    76         $this->checkArg($which, is_string($value), $this->wrongTypeMessage(
"string", $value));
    85     protected function checkStringOrSignalArg(
string $which, $value): void
    89             is_string($value) || $value instanceof 
Signal,
    90             $this->wrongTypeMessage(
"string or Signal", gettype($value))
   100     protected function checkBoolArg(
string $which, $value): void
   102         $this->checkArg($which, is_bool($value), $this->wrongTypeMessage(
"bool", $value));
   111     protected function checkArgInstanceOf(
string $which, $value, 
string $class): void
   113         $this->checkArg($which, $value instanceof $class, $this->wrongTypeMessage($class, $value));
   122     protected function checkArgIsElement(
string $which, $value, array $array, 
string $name): void
   124         if (!is_object($value)) {
   125             $message = 
"expected $name, got '$value'";
   127             $message = 
"expected $name, got object.";
   129         $this->checkArg($which, in_array($value, $array), $message);
   139     protected function checkArgList(
string $which, array &$values, 
Closure $check, 
Closure $message): void
   143         foreach ($values as 
$key => $value) {
   152         if ($failed_k !== null) {
   153             $m = 
$message($failed_k, $failed_v);
   158         $this->checkArg($which, $failed_k === null, $m);
   168     protected function checkArgListElements(
string $which, array &$values, $classes): void
   170         $classes = $this->toArray($classes);
   171         $this->checkArgList($which, $values, 
function ($_, $value) use (&$classes) {
   172             foreach ($classes as $cls) {
   173                 if ($cls === 
"string" && is_string($value)) {
   176                 if ($cls === 
"int" && is_int($value)) {
   178                 } elseif ($value instanceof $cls) {
   183         }, 
function ($_, $failed) use (&$classes) {
   184             return $this->wrongTypeMessage(implode(
", ", $classes), $failed);
   196     protected function checkInputListElements(
string $which, array $values, $classes, 
int $depth = 0): void
   199             throw new \LogicException(
'Input nesting limit of 255 exceeded.');
   202         $classes = $this->toArray($classes);
   203         foreach ($values as $value) {
   204             foreach ($classes as $class) {
   205                 $this->checkArgInstanceOf($which, $value, $class);
   209                 $this->checkInputListElements($which, $value->getInputs(), $classes, $depth + 1);
   219     protected function toArray($value): array
   221         if (is_array($value)) {
   224         return array($value);
   230     protected function wrongTypeMessage(
string $expected, $value): string
   232         $type = gettype($value);
   233         if (!is_object($value) && !is_array($value)) {
   234             return "expected $expected, got $type '$value'";
   236             if (is_object($value)) {
   237                 $type = get_class($value);
   239             return "expected $expected, got $type";
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
Class ChatMainBarProvider . 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
getCanonicalName()
Get the canonical name of the component.