5 * Contains \Drupal\filefield_sources\ProxyClass\File\MimeType\ExtensionMimeTypeGuesser.
9 * This file was generated via php core/scripts/generate-proxy-class.php 'Drupal\filefield_sources\File\MimeType\ExtensionMimeTypeGuesser' "modules/filefield_sources/src".
12 namespace Drupal\filefield_sources\ProxyClass\File\MimeType {
15 * Provides a proxy class for \Drupal\filefield_sources\File\MimeType\ExtensionMimeTypeGuesser.
17 * @see \Drupal\Component\ProxyBuilder
19 class ExtensionMimeTypeGuesser implements \Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface
22 use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
25 * The id of the original proxied service.
29 protected $drupalProxyOriginalServiceId;
32 * The real proxied service, after it was lazy loaded.
34 * @var \Drupal\filefield_sources\File\MimeType\ExtensionMimeTypeGuesser
39 * The service container.
41 * @var \Symfony\Component\DependencyInjection\ContainerInterface
46 * Constructs a ProxyClass Drupal proxy object.
48 * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
50 * @param string $drupal_proxy_original_service_id
51 * The service ID of the original service.
53 public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $drupal_proxy_original_service_id)
55 $this->container = $container;
56 $this->drupalProxyOriginalServiceId = $drupal_proxy_original_service_id;
60 * Lazy loads the real service from the container.
63 * Returns the constructed real service.
65 protected function lazyLoadItself()
67 if (!isset($this->service)) {
68 $this->service = $this->container->get($this->drupalProxyOriginalServiceId);
71 return $this->service;
77 public function convertMimeTypeToExtension($mimetype)
79 return $this->lazyLoadItself()->convertMimeTypeToExtension($mimetype);
85 public function convertMimeTypeToMostCommonExtension($mimetype)
87 return $this->lazyLoadItself()->convertMimeTypeToMostCommonExtension($mimetype);
93 public function guess($path)
95 return $this->lazyLoadItself()->guess($path);
101 public function setMapping(array $mapping = NULL)
103 return $this->lazyLoadItself()->setMapping($mapping);