Skip to content

Commit

Permalink
Merge pull request #20 from Seldaek/patch-1
Browse files Browse the repository at this point in the history
Make proxy classes env dependent
  • Loading branch information
schmittjoh committed Jul 29, 2013
2 parents 7018357 + a25ac2d commit 1fc780b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions DependencyInjection/Compiler/PointcutMatchingPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
namespace JMS\AopBundle\DependencyInjection\Compiler;

use CG\Core\ClassUtils;
use CG\Core\DefaultNamingStrategy;
use JMS\AopBundle\Exception\RuntimeException;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\DependencyInjection\Reference;
Expand Down Expand Up @@ -167,6 +168,7 @@ private function processDefinition(Definition $definition, $pointcuts, &$interce
$enhancer = new Enhancer($class, array(), array(
$generator
));
$enhancer->setNamingStrategy(new DefaultNamingStrategy('EnhancedProxy'.substr(md5($this->container->getParameter('jms_aop.cache_dir')), 0, 8)));
$enhancer->writeClass($filename = $this->cacheDir.'/'.str_replace('\\', '-', $class->name).'.php');
$definition->setFile($filename);
$definition->setClass($enhancer->getClassName($class));
Expand Down

0 comments on commit 1fc780b

Please sign in to comment.