46 return GeneralUtility::makeInstance(self::class);
57 if (!class_exists($className)) {
58 throw new \InvalidArgumentException(
'The class "' . $className .
'" you are trying to register is not available', 1411840171);
60 if (!in_array(FileRendererInterface::class, class_implements($className),
true)) {
61 throw new \InvalidArgumentException(
'The renderer needs to implement the FileRendererInterface', 1411840172);
63 $this->classNames[] = $className;
73 if ($this->instances ===
null) {
74 $this->instances = [];
83 $this->instances[] = $object;
86 if (count($this->instances) > 1) {
87 usort($this->instances, [$this,
'compareRendererPriority']);
101 return GeneralUtility::makeInstance($className);
127 $matchingFileRenderer =
null;
131 if ($fileRenderer->canRender($file)) {
132 $matchingFileRenderer = $fileRenderer;
136 return $matchingFileRenderer;