Skip to content

Commit 092a2c5

Browse files
PMPPNyholm
authored andcommitted
Use existing proxy file, and loaded it (#86)
1 parent b0b54bb commit 092a2c5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/DataCollector/ProxyFactory.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ public function createProxy($class, &$proxyFile = null)
4949
return $proxyClass;
5050
}
5151

52+
if (file_exists($proxyFile)) {
53+
require $proxyFile;
54+
55+
return $proxyClass;
56+
}
57+
5258
$content = file_get_contents(dirname(__DIR__).'/Resources/proxy/template.php');
5359
$content = str_replace('__TPL_CLASS__', $proxyClass, $content);
5460
$content = str_replace('__TPL_EXTENDS__', $class, $content);

0 commit comments

Comments
 (0)