[ Index ] |
PHP Cross Reference of phpBB-3.3.14-deutsch |
[Summary view] [Print] [Text view]
1 --- 2 title: Generator strategies 3 --- 4 5 # Generator strategies 6 7 ProxyManager allows you to generate classes based on generator strategies and a 8 given `Zend\Code\Generator\ClassGenerator` as of 9 the [interface of a generator strategy](https://github.com/Ocramius/ProxyManager/blob/master/src/ProxyManager/GeneratorStrategy/GeneratorStrategyInterface.php). 10 11 Currently, 3 generator strategies are shipped with ProxyManager: 12 13 * [`ProxyManager\GeneratorStrategy\BaseGeneratorStrategy`](https://github.com/Ocramius/ProxyManager/blob/master/src/ProxyManager/GeneratorStrategy/BaseGeneratorStrategy.php), 14 which simply retrieves the string representation of the class from `ClassGenerator` 15 * [`ProxyManager\GeneratorStrategy\EvaluatingGeneratorStrategy`](https://github.com/Ocramius/ProxyManager/blob/master/src/ProxyManager/GeneratorStrategy/EvaluatingGeneratorStrategy.php), 16 which calls `eval()` upon the generated class code before returning it. This is useful in cases 17 where you want to generate multiple classes at runtime 18 * [`ProxyManager\GeneratorStrategy\FileWriterGeneratorStrategy`](https://github.com/Ocramius/ProxyManager/blob/master/src/ProxyManager/GeneratorStrategy/FileWriterGeneratorStrategy.php), 19 which accepts a [`ProxyManager\FileLocator\FileLocatorInterface`](https://github.com/Ocramius/ProxyManager/blob/master/src/ProxyManager/FileLocator/FileLocatorInterface.php) 20 instance as constructor parameter, and based on it, writes the generated class to a file before returning its code.
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Mon Nov 25 19:05:08 2024 | Cross-referenced by PHPXref 0.7.1 |