Same filename in this branch
- 10 core/lib/Drupal/Core/File/MimeType/ExtensionMimeTypeGuesser.php
- 10 core/lib/Drupal/Core/ProxyClass/File/MimeType/ExtensionMimeTypeGuesser.php
Same filename and directory in other branches
- 8.9.x core/lib/Drupal/Core/ProxyClass/File/MimeType/ExtensionMimeTypeGuesser.php
- 9 core/lib/Drupal/Core/ProxyClass/File/MimeType/ExtensionMimeTypeGuesser.php
Namespace
Drupal\Core\ProxyClass\File\MimeType
File
core/lib/Drupal/Core/ProxyClass/File/MimeType/ExtensionMimeTypeGuesser.php
View source
<?php
namespace Drupal\Core\ProxyClass\File\MimeType;
class ExtensionMimeTypeGuesser implements \Symfony\Component\Mime\MimeTypeGuesserInterface {
use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
protected $drupalProxyOriginalServiceId;
protected $service;
protected $container;
public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $drupal_proxy_original_service_id) {
$this->container = $container;
$this->drupalProxyOriginalServiceId = $drupal_proxy_original_service_id;
}
protected function lazyLoadItself() {
if (!isset($this->service)) {
$this->service = $this->container
->get($this->drupalProxyOriginalServiceId);
}
return $this->service;
}
public function guessMimeType($path) : ?string {
return $this
->lazyLoadItself()
->guessMimeType($path);
}
public function setMapping(?array $mapping = NULL) {
return $this
->lazyLoadItself()
->setMapping($mapping);
}
public function isGuesserSupported() : bool {
return $this
->lazyLoadItself()
->isGuesserSupported();
}
}
Classes