Further modules included.
[yaffs-website] / web / modules / contrib / filefield_sources / src / ProxyClass / File / MimeType / ExtensionMimeTypeGuesser.php
1 <?php
2
3 /**
4  * @file
5  * Contains \Drupal\filefield_sources\ProxyClass\File\MimeType\ExtensionMimeTypeGuesser.
6  */
7
8 /**
9  * This file was generated via php core/scripts/generate-proxy-class.php 'Drupal\filefield_sources\File\MimeType\ExtensionMimeTypeGuesser' "modules/filefield_sources/src".
10  */
11
12 namespace Drupal\filefield_sources\ProxyClass\File\MimeType {
13
14     /**
15      * Provides a proxy class for \Drupal\filefield_sources\File\MimeType\ExtensionMimeTypeGuesser.
16      *
17      * @see \Drupal\Component\ProxyBuilder
18      */
19     class ExtensionMimeTypeGuesser implements \Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface
20     {
21
22         use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
23
24         /**
25          * The id of the original proxied service.
26          *
27          * @var string
28          */
29         protected $drupalProxyOriginalServiceId;
30
31         /**
32          * The real proxied service, after it was lazy loaded.
33          *
34          * @var \Drupal\filefield_sources\File\MimeType\ExtensionMimeTypeGuesser
35          */
36         protected $service;
37
38         /**
39          * The service container.
40          *
41          * @var \Symfony\Component\DependencyInjection\ContainerInterface
42          */
43         protected $container;
44
45         /**
46          * Constructs a ProxyClass Drupal proxy object.
47          *
48          * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
49          *   The container.
50          * @param string $drupal_proxy_original_service_id
51          *   The service ID of the original service.
52          */
53         public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $drupal_proxy_original_service_id)
54         {
55             $this->container = $container;
56             $this->drupalProxyOriginalServiceId = $drupal_proxy_original_service_id;
57         }
58
59         /**
60          * Lazy loads the real service from the container.
61          *
62          * @return object
63          *   Returns the constructed real service.
64          */
65         protected function lazyLoadItself()
66         {
67             if (!isset($this->service)) {
68                 $this->service = $this->container->get($this->drupalProxyOriginalServiceId);
69             }
70
71             return $this->service;
72         }
73
74         /**
75          * {@inheritdoc}
76          */
77         public function convertMimeTypeToExtension($mimetype)
78         {
79             return $this->lazyLoadItself()->convertMimeTypeToExtension($mimetype);
80         }
81
82         /**
83          * {@inheritdoc}
84          */
85         public function convertMimeTypeToMostCommonExtension($mimetype)
86         {
87             return $this->lazyLoadItself()->convertMimeTypeToMostCommonExtension($mimetype);
88         }
89
90         /**
91          * {@inheritdoc}
92          */
93         public function guess($path)
94         {
95             return $this->lazyLoadItself()->guess($path);
96         }
97
98         /**
99          * {@inheritdoc}
100          */
101         public function setMapping(array $mapping = NULL)
102         {
103             return $this->lazyLoadItself()->setMapping($mapping);
104         }
105
106     }
107
108 }