public function MimeMapManager::setMapClass in Sophron 8
Sets the map class to use by the manager.
Parameters
string $map_class: A FQCN.
Return value
$this
Overrides MimeMapManagerInterface::setMapClass
2 calls to MimeMapManager::setMapClass()
- MimeMapManager::getMapClass in src/
MimeMapManager.php - Gets the FQCN of map currently in use by the manager.
- MimeMapManager::getMappingErrors in src/
MimeMapManager.php - Gets the initialization errors of a map class.
File
- src/
MimeMapManager.php, line 125
Class
- MimeMapManager
- Provides a sensible mapping between filename extensions and MIME types.
Namespace
Drupal\sophronCode
public function setMapClass($map_class) {
$this->currentMapClass = $map_class;
if (!isset($this->initializedMapClasses[$map_class])) {
$event = new MapEvent($map_class);
$this->eventDispatcher
->dispatch(MapEvent::INIT, $event);
$this->initializedMapClasses[$map_class] = $event
->getErrors();
}
return $this;
}