PHP Class bitExpert\Disco\Proxy\Configuration\MethodGenerator\BeanMethod

Inheritance: extends ProxyManager\Generator\MethodGenerator
Datei anzeigen Open project: bitExpert/disco Class Usage Examples

Public Methods

Method Description
fromReflection ( Zend\Code\Reflection\MethodReflection $reflectionMethod ) : ProxyManager\Generator\MethodGenerator
generateMethod ( Zend\Code\Reflection\MethodReflection $originalMethod, Bean $beanMetadata, Parameters $methodParameters, $beanType, ForceLazyInitProperty $forceLazyInitProperty, SessionBeansProperty $sessionBeansProperty, BeanPostProcessorsProperty $postProcessorsProperty, BeanFactoryConfigurationProperty $beanFactoryConfigurationProperty, GetParameter $parameterValuesMethod, WrapBeanAsLazy $wrapBeanAsLazy ) : BeanMethod | ProxyManager\Generator\MethodGenerator Creates a new {@link \bitExpert\Disco\Proxy\Configuration\MethodGenerator\BeanMethod}.

Protected Methods

Method Description
convertMethodParamsToString ( Parameters $methodParameters, GetParameter $parameterValuesMethod ) : string Converts the Parameter annotations to the respective getParameter() method calls to retrieve the configuration values.
generateBeanCreationCode ( string $padding, string $beanId, string $methodParams, BeanPostProcessorsProperty $postProcessorsProperty ) : string Helper method to generate the code to initialize a bean.
generateLazyBeanCode ( string $padding, string $beanId, string $beanType, Bean $beanMetadata, string $methodParams, ForceLazyInitProperty $forceLazyInitProperty, SessionBeansProperty $sessionBeansProperty, BeanPostProcessorsProperty $postProcessorsProperty, BeanFactoryConfigurationProperty $beanFactoryConfigurationProperty ) : string Helper method to generate the method body for managing lazy bean instances.
generateNonLazyBeanCode ( string $padding, string $beanId, string $beanType, Bean $beanMetadata, string $methodParams, ForceLazyInitProperty $forceLazyInitProperty, SessionBeansProperty $sessionBeansProperty, BeanPostProcessorsProperty $postProcessorsProperty, WrapBeanAsLazy $wrapBeanAsLazy ) : string Helper method to generate the method body for managing non-lazy bean instances.

Method Details

convertMethodParamsToString() protected static method

Converts the Parameter annotations to the respective getParameter() method calls to retrieve the configuration values.
protected static convertMethodParamsToString ( Parameters $methodParameters, GetParameter $parameterValuesMethod ) : string
$methodParameters bitExpert\Disco\Annotations\Parameters
$parameterValuesMethod GetParameter
return string

fromReflection() public static method

public static fromReflection ( Zend\Code\Reflection\MethodReflection $reflectionMethod ) : ProxyManager\Generator\MethodGenerator
$reflectionMethod Zend\Code\Reflection\MethodReflection
return ProxyManager\Generator\MethodGenerator

generateBeanCreationCode() protected static method

Helper method to generate the code to initialize a bean.
protected static generateBeanCreationCode ( string $padding, string $beanId, string $methodParams, BeanPostProcessorsProperty $postProcessorsProperty ) : string
$padding string
$beanId string
$methodParams string
$postProcessorsProperty bitExpert\Disco\Proxy\Configuration\PropertyGenerator\BeanPostProcessorsProperty
return string

generateLazyBeanCode() protected static method

Helper method to generate the method body for managing lazy bean instances.
protected static generateLazyBeanCode ( string $padding, string $beanId, string $beanType, Bean $beanMetadata, string $methodParams, ForceLazyInitProperty $forceLazyInitProperty, SessionBeansProperty $sessionBeansProperty, BeanPostProcessorsProperty $postProcessorsProperty, BeanFactoryConfigurationProperty $beanFactoryConfigurationProperty ) : string
$padding string
$beanId string
$beanType string
$beanMetadata bitExpert\Disco\Annotations\Bean
$methodParams string
$forceLazyInitProperty bitExpert\Disco\Proxy\Configuration\PropertyGenerator\ForceLazyInitProperty
$sessionBeansProperty bitExpert\Disco\Proxy\Configuration\PropertyGenerator\SessionBeansProperty
$postProcessorsProperty bitExpert\Disco\Proxy\Configuration\PropertyGenerator\BeanPostProcessorsProperty
$beanFactoryConfigurationProperty bitExpert\Disco\Proxy\Configuration\PropertyGenerator\BeanFactoryConfigurationProperty
return string

generateMethod() public static method

Creates a new {@link \bitExpert\Disco\Proxy\Configuration\MethodGenerator\BeanMethod}.
public static generateMethod ( Zend\Code\Reflection\MethodReflection $originalMethod, Bean $beanMetadata, Parameters $methodParameters, $beanType, ForceLazyInitProperty $forceLazyInitProperty, SessionBeansProperty $sessionBeansProperty, BeanPostProcessorsProperty $postProcessorsProperty, BeanFactoryConfigurationProperty $beanFactoryConfigurationProperty, GetParameter $parameterValuesMethod, WrapBeanAsLazy $wrapBeanAsLazy ) : BeanMethod | ProxyManager\Generator\MethodGenerator
$originalMethod Zend\Code\Reflection\MethodReflection
$beanMetadata bitExpert\Disco\Annotations\Bean
$methodParameters bitExpert\Disco\Annotations\Parameters
$beanType
$forceLazyInitProperty bitExpert\Disco\Proxy\Configuration\PropertyGenerator\ForceLazyInitProperty
$sessionBeansProperty bitExpert\Disco\Proxy\Configuration\PropertyGenerator\SessionBeansProperty
$postProcessorsProperty bitExpert\Disco\Proxy\Configuration\PropertyGenerator\BeanPostProcessorsProperty
$beanFactoryConfigurationProperty bitExpert\Disco\Proxy\Configuration\PropertyGenerator\BeanFactoryConfigurationProperty
$parameterValuesMethod GetParameter
$wrapBeanAsLazy WrapBeanAsLazy
return BeanMethod | ProxyManager\Generator\MethodGenerator

generateNonLazyBeanCode() protected static method

Helper method to generate the method body for managing non-lazy bean instances.
protected static generateNonLazyBeanCode ( string $padding, string $beanId, string $beanType, Bean $beanMetadata, string $methodParams, ForceLazyInitProperty $forceLazyInitProperty, SessionBeansProperty $sessionBeansProperty, BeanPostProcessorsProperty $postProcessorsProperty, WrapBeanAsLazy $wrapBeanAsLazy ) : string
$padding string
$beanId string
$beanType string
$beanMetadata bitExpert\Disco\Annotations\Bean
$methodParams string
$forceLazyInitProperty bitExpert\Disco\Proxy\Configuration\PropertyGenerator\ForceLazyInitProperty
$sessionBeansProperty bitExpert\Disco\Proxy\Configuration\PropertyGenerator\SessionBeansProperty
$postProcessorsProperty bitExpert\Disco\Proxy\Configuration\PropertyGenerator\BeanPostProcessorsProperty
$wrapBeanAsLazy WrapBeanAsLazy
return string