Skip to content

Commit

Permalink
Revert "Merge pull request #254 from localheinz/fix/signature"
Browse files Browse the repository at this point in the history
This reverts commit 9470713, reversing
changes made to 56e460c.
  • Loading branch information
Ocramius committed Aug 24, 2015
1 parent 9470713 commit 0793999
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/ProxyManager/Factory/AbstractBaseFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ public function __construct(Configuration $configuration = null)
* Generate a proxy from a class name
*
* @param string $className
* @param mixed[] $proxyOptions
*
* @return string proxy class name
*/
protected function generateProxy($className)
protected function generateProxy($className, array $proxyOptions = [])
{
if (isset($this->checkedClasses[$className])) {
return $this->checkedClasses[$className];
Expand All @@ -78,7 +79,8 @@ protected function generateProxy($className)
$this->generateProxyClass(
$proxyClassName,
$className,
$proxyParameters
$proxyParameters,
$proxyOptions
);
}

Expand All @@ -101,19 +103,20 @@ abstract protected function getGenerator();
* @param string $proxyClassName
* @param string $className
* @param array $proxyParameters
* @param mixed[] $proxyOptions
*
* @return void
*/
private function generateProxyClass($proxyClassName, $className, array $proxyParameters)
private function generateProxyClass($proxyClassName, $className, array $proxyParameters, array $proxyOptions = [])
{
$className = $this->configuration->getClassNameInflector()->getUserClassName($className);
$phpClass = new ClassGenerator($proxyClassName);

$this->getGenerator()->generate(new ReflectionClass($className), $phpClass);
$this->getGenerator()->generate(new ReflectionClass($className), $phpClass, $proxyOptions);

$phpClass = $this->configuration->getClassSignatureGenerator()->addSignature($phpClass, $proxyParameters);

$this->configuration->getGeneratorStrategy()->generate($phpClass);
$this->configuration->getGeneratorStrategy()->generate($phpClass, $proxyOptions);

$autoloader = $this->configuration->getProxyAutoloader();

Expand Down

0 comments on commit 0793999

Please sign in to comment.