45 return GeneralUtility::makeInstance(self::class);
56 if (!class_exists($className)) {
57 throw new \InvalidArgumentException(
'The class "' . $className .
'" you are registering is not available', 1422705270);
59 if (!in_array(ExtractorInterface::class, class_implements($className))) {
60 throw new \InvalidArgumentException(
'The extractor needs to implement the ExtractorInterface', 1422705271);
62 $this->extractors[] = $className;
72 if ($this->instances ===
null) {
73 $this->instances = [];
79 $this->instances[] = $object;
82 if (count($this->instances) > 1) {
83 usort($this->instances, [$this,
'compareExtractorPriority']);
99 $filteredExtractors = [];
100 foreach ($allExtractors as $priority => $extractorObject) {
101 if (empty($extractorObject->getDriverRestrictions())) {
102 $filteredExtractors[$priority] = $extractorObject;
103 } elseif (in_array($driverType, $extractorObject->getDriverRestrictions())) {
104 $filteredExtractors[$priority] = $extractorObject;
107 return $filteredExtractors;
133 return GeneralUtility::makeInstance($className);