Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\DependencyInjection\LazyProxy\PhpDumper; Chris@0: Chris@0: use Symfony\Component\DependencyInjection\Definition; Chris@0: Chris@0: /** Chris@0: * Lazy proxy dumper capable of generating the instantiation logic PHP code for proxied services. Chris@0: * Chris@0: * @author Marco Pivetta Chris@0: */ Chris@0: interface DumperInterface Chris@0: { Chris@0: /** Chris@0: * Inspects whether the given definitions should produce proxy instantiation logic in the dumped container. Chris@0: * Chris@0: * @return bool Chris@0: */ Chris@0: public function isProxyCandidate(Definition $definition); Chris@0: Chris@0: /** Chris@0: * Generates the code to be used to instantiate a proxy in the dumped factory code. Chris@0: * Chris@0: * @param Definition $definition Chris@14: * @param string $id Service identifier Chris@14: * @param string $factoryCode The code to execute to create the service, will be added to the interface in 4.0 Chris@0: * Chris@0: * @return string Chris@0: */ Chris@14: public function getProxyFactoryCode(Definition $definition, $id/**, $factoryCode = null */); Chris@0: Chris@0: /** Chris@0: * Generates the code for the lazy proxy. Chris@0: * Chris@0: * @return string Chris@0: */ Chris@0: public function getProxyCode(Definition $definition); Chris@0: }