[ Index ] |
PHP Cross Reference of phpBB-3.2.11-deutsch |
[Summary view] [Print] [Text view]
1 --TEST-- 2 Verifies that lazy loading ghost proxy file is generated 3 --FILE-- 4 <?php 5 6 require_once __DIR__ . '/init.php'; 7 8 class Kitchen 9 { 10 private $sweets = 'candy'; 11 } 12 13 $configuration->setProxiesTargetDir(__DIR__ . '/cache'); 14 $fileLocator = new \ProxyManager\FileLocator\FileLocator($configuration->getProxiesTargetDir()); 15 $configuration->setGeneratorStrategy( 16 new \ProxyManager\GeneratorStrategy\FileWriterGeneratorStrategy($fileLocator) 17 ); 18 19 $factory = new \ProxyManager\Factory\LazyLoadingGhostFactory($configuration); 20 21 $proxy = $factory->createProxy('Kitchen', function () {}); 22 23 $filename = $fileLocator->getProxyFileName(get_class($proxy)); 24 var_dump(file_exists($filename)); 25 26 $proxy = $factory->createProxy('Kitchen', function () {}); 27 28 var_dump(file_exists($filename)); 29 @unlink($filename); 30 31 ?> 32 --EXPECT-- 33 bool(true) 34 bool(true)
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Nov 11 20:33:01 2020 | Cross-referenced by PHPXref 0.7.1 |