bitExpert\Disco\Proxy\Configuration\MethodGenerator\Constructor::__construct PHP Метод

__construct() публичный Метод

Creates a new {@link \bitExpert\Disco\Proxy\Configuration\MethodGenerator\Constructor}.
public __construct ( ReflectionClass $originalClass, ParameterValuesProperty $parameterValuesProperty, SessionBeansProperty $sessionBeansProperty, BeanFactoryConfigurationProperty $beanFactoryConfigurationProperty, BeanPostProcessorsProperty $beanPostProcessorsProperty, array $beanPostProcessorMethodNames )
$originalClass ReflectionClass
$parameterValuesProperty bitExpert\Disco\Proxy\Configuration\PropertyGenerator\ParameterValuesProperty
$sessionBeansProperty bitExpert\Disco\Proxy\Configuration\PropertyGenerator\SessionBeansProperty
$beanFactoryConfigurationProperty bitExpert\Disco\Proxy\Configuration\PropertyGenerator\BeanFactoryConfigurationProperty
$beanPostProcessorsProperty bitExpert\Disco\Proxy\Configuration\PropertyGenerator\BeanPostProcessorsProperty
$beanPostProcessorMethodNames array
    public function __construct(ReflectionClass $originalClass, ParameterValuesProperty $parameterValuesProperty, SessionBeansProperty $sessionBeansProperty, BeanFactoryConfigurationProperty $beanFactoryConfigurationProperty, BeanPostProcessorsProperty $beanPostProcessorsProperty, array $beanPostProcessorMethodNames)
    {
        parent::__construct('__construct');
        $beanFactoryConfigurationParameter = new ParameterGenerator('config');
        $beanFactoryConfigurationParameter->setType(BeanFactoryConfiguration::class);
        $parametersParameter = new ParameterGenerator('params');
        $parametersParameter->setDefaultValue([]);
        $body = '$this->' . $parameterValuesProperty->getName() . ' = $' . $parametersParameter->getName() . ';' . PHP_EOL;
        $body .= '$this->' . $beanFactoryConfigurationProperty->getName() . ' = $' . $beanFactoryConfigurationParameter->getName() . ';' . PHP_EOL;
        $body .= '$this->' . $sessionBeansProperty->getName() . ' = $' . $beanFactoryConfigurationParameter->getName() . '->getSessionBeanStore();' . PHP_EOL;
        $body .= '// register {@link \\bitExpert\\Disco\\BeanPostProcessor} instances' . PHP_EOL;
        $body .= '$this->' . $beanPostProcessorsProperty->getName() . '[] = new \\bitExpert\\Disco\\BeanFactoryPostProcessor();' . PHP_EOL;
        foreach ($beanPostProcessorMethodNames as $methodName) {
            $body .= '$this->' . $beanPostProcessorsProperty->getName() . '[] = $this->' . $methodName . '(); ';
            $body .= PHP_EOL;
        }
        $this->setParameter($beanFactoryConfigurationParameter);
        $this->setParameter($parametersParameter);
        $this->setBody($body);
        $this->setDocBlock("@override constructor");
    }
Constructor