Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
Configuration.php
001 <?php
002 /*
003 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
004 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
005 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
006 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
007 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
008 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
009 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
010 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
011 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
012 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
013 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
014 *
015 * This software consists of voluntary contributions made by many individuals
016 * and is licensed under the MIT license.
017 */
018
019 namespace ProxyManager;
020
021 use ProxyManager\Autoloader\Autoloader;
022 use ProxyManager\Autoloader\AutoloaderInterface;
023 use ProxyManager\FileLocator\FileLocator;
024 use ProxyManager\GeneratorStrategy\FileWriterGeneratorStrategy;
025 use ProxyManager\GeneratorStrategy\GeneratorStrategyInterface;
026 use ProxyManager\Inflector\ClassNameInflector;
027 use ProxyManager\Inflector\ClassNameInflectorInterface;
028 use ProxyManager\Signature\ClassSignatureGenerator;
029 use ProxyManager\Signature\ClassSignatureGeneratorInterface;
030 use ProxyManager\Signature\SignatureChecker;
031 use ProxyManager\Signature\SignatureCheckerInterface;
032 use ProxyManager\Signature\SignatureGenerator;
033 use ProxyManager\Signature\SignatureGeneratorInterface;
034
035 /**
036 * Base configuration class for the proxy manager - serves as micro disposable DIC/facade
037 *
038 * @author Marco Pivetta <ocramius@gmail.com>
039 * @license MIT
040 */
041 class Configuration
042 {
043 const DEFAULT_PROXY_NAMESPACE = 'ProxyManagerGeneratedProxy';
044
045 /**
046 * @var string|null
047 */
048 protected $proxiesTargetDir;
049
050 /**
051 * @var string
052 */
053 protected $proxiesNamespace = self::DEFAULT_PROXY_NAMESPACE;
054
055 /**
056 * @var GeneratorStrategyInterface|null
057 */
058 protected $generatorStrategy;
059
060 /**
061 * @var callable|null
062 */
063 protected $proxyAutoloader;
064
065 /**
066 * @var ClassNameInflectorInterface|null
067 */
068 protected $classNameInflector;
069
070 /**
071 * @var SignatureGeneratorInterface|null
072 */
073 protected $signatureGenerator;
074
075 /**
076 * @var SignatureCheckerInterface|null
077 */
078 protected $signatureChecker;
079
080 /**
081 * @var ClassSignatureGeneratorInterface|null
082 */
083 protected $classSignatureGenerator;
084
085 /**
086 * @deprecated deprecated since version 0.5
087 * @codeCoverageIgnore
088 */
089 public function setAutoGenerateProxies()
090 {
091 }
092
093 /**
094 * @return bool
095 *
096 * @deprecated deprecated since version 0.5
097 * @codeCoverageIgnore
098 */
099 public function doesAutoGenerateProxies()
100 {
101 return true;
102 }
103
104 /**
105 * @param AutoloaderInterface $proxyAutoloader
106 */
107 public function setProxyAutoloader(AutoloaderInterface $proxyAutoloader)
108 {
109 $this->proxyAutoloader = $proxyAutoloader;
110 }
111
112 /**
113 * @return AutoloaderInterface
114 */
115 public function getProxyAutoloader()
116 {
117 return $this->proxyAutoloader
118 ?: $this->proxyAutoloader = new Autoloader(
119 new FileLocator($this->getProxiesTargetDir()),
120 $this->getClassNameInflector()
121 );
122 }
123
124 /**
125 * @param string $proxiesNamespace
126 */
127 public function setProxiesNamespace($proxiesNamespace)
128 {
129 $this->proxiesNamespace = $proxiesNamespace;
130 }
131
132 /**
133 * @return string
134 */
135 public function getProxiesNamespace()
136 {
137 return $this->proxiesNamespace;
138 }
139
140 /**
141 * @param string $proxiesTargetDir
142 */
143 public function setProxiesTargetDir($proxiesTargetDir)
144 {
145 $this->proxiesTargetDir = (string) $proxiesTargetDir;
146 }
147
148 /**
149 * @return string
150 */
151 public function getProxiesTargetDir()
152 {
153 return $this->proxiesTargetDir ?: $this->proxiesTargetDir = sys_get_temp_dir();
154 }
155
156 /**
157 * @param GeneratorStrategyInterface $generatorStrategy
158 */
159 public function setGeneratorStrategy(GeneratorStrategyInterface $generatorStrategy)
160 {
161 $this->generatorStrategy = $generatorStrategy;
162 }
163
164 /**
165 * @return GeneratorStrategyInterface
166 */
167 public function getGeneratorStrategy()
168 {
169 return $this->generatorStrategy
170 ?: $this->generatorStrategy = new FileWriterGeneratorStrategy(
171 new FileLocator($this->getProxiesTargetDir())
172 );
173 }
174
175 /**
176 * @param ClassNameInflectorInterface $classNameInflector
177 */
178 public function setClassNameInflector(ClassNameInflectorInterface $classNameInflector)
179 {
180 $this->classNameInflector = $classNameInflector;
181 }
182
183 /**
184 * @return ClassNameInflectorInterface
185 */
186 public function getClassNameInflector()
187 {
188 return $this->classNameInflector
189 ?: $this->classNameInflector = new ClassNameInflector($this->getProxiesNamespace());
190 }
191
192 /**
193 * @param SignatureGeneratorInterface $signatureGenerator
194 */
195 public function setSignatureGenerator(SignatureGeneratorInterface $signatureGenerator)
196 {
197 $this->signatureGenerator = $signatureGenerator;
198 }
199
200 /**
201 * @return SignatureGeneratorInterface
202 */
203 public function getSignatureGenerator()
204 {
205 return $this->signatureGenerator ?: $this->signatureGenerator = new SignatureGenerator();
206 }
207
208 /**
209 * @param SignatureCheckerInterface $signatureChecker
210 */
211 public function setSignatureChecker(SignatureCheckerInterface $signatureChecker)
212 {
213 $this->signatureChecker = $signatureChecker;
214 }
215
216 /**
217 * @return SignatureCheckerInterface
218 */
219 public function getSignatureChecker()
220 {
221 return $this->signatureChecker
222 ?: $this->signatureChecker = new SignatureChecker($this->getSignatureGenerator());
223 }
224
225 /**
226 * @param ClassSignatureGeneratorInterface $classSignatureGenerator
227 */
228 public function setClassSignatureGenerator(ClassSignatureGeneratorInterface $classSignatureGenerator)
229 {
230 $this->classSignatureGenerator = $classSignatureGenerator;
231 }
232
233 /**
234 * @return ClassSignatureGeneratorInterface
235 */
236 public function getClassSignatureGenerator()
237 {
238 return $this->classSignatureGenerator
239 ?: new ClassSignatureGenerator($this->getSignatureGenerator());
240 }
241 }
242