src/mg/Ding/Bean/Provider/Core.php
public function getBeanDefinition($name)
    {
        $bean = null;
        switch ($name)
        {
        case 'dingAnnotationParser':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Annotation\Parser');
            break;
        case 'dingAnnotationsCache':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Cache\Locator\CacheLocator');
            $bean->setFactoryMethod('getAnnotationsCacheInstance');
            break;
        case 'dingBeanCache':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Cache\Locator\CacheLocator');
            $bean->setFactoryMethod('getBeansCacheInstance');
            break;
        case 'dingDefinitionsCache':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Cache\Locator\CacheLocator');
            $bean->setFactoryMethod('getDefinitionsCacheInstance');
            break;
        case 'dingProxyCache':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Cache\Locator\CacheLocator');
            $bean->setFactoryMethod('getProxyCacheInstance');
            break;
        case 'dingAspectCache':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Cache\Locator\CacheLocator');
            $bean->setFactoryMethod('getAspectCacheInstance');
            break;
        case 'dingAspectManager':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Aspect\AspectManager');
            $bean->setProperties(array(
                new BeanPropertyDefinition(
                	'cache', BeanPropertyDefinition::PROPERTY_BEAN,
                	'dingAspectCache'
                )
            ));
            break;
        case 'dingXmlBeanDefinitionProvider':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Provider\Xml');
            $bean->setArguments(array(
                new BeanConstructorArgumentDefinition(
                    BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_VALUE,
                    $this->options['bdef']['xml']
                )
            ));
            break;
        case 'dingAnnotationBeanDefinitionProvider':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Provider\Annotation');
            $bean->setArguments(array(
                new BeanConstructorArgumentDefinition(
                    BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_VALUE,
                    $this->options['bdef']['annotation']
                )
            ));
            $bean->setInitMethod('init');
            $bean->setProperties(array(
                new BeanPropertyDefinition(
                	'cache', BeanPropertyDefinition::PROPERTY_BEAN,
                	'dingAnnotationsCache'
                )
            ));
            break;
        case 'dingYamlBeanDefinitionProvider':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Provider\Yaml');
            $bean->setArguments(array(
                new BeanConstructorArgumentDefinition(
                    BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_VALUE,
                    $this->options['bdef']['yaml']
                )
            ));
            break;
        case 'dingAspectCallDispatcher':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Aspect\Interceptor\DispatcherImpl');
            break;
        case 'dingAnnotationInitDestroyMethodDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\AnnotationInitDestroyMethodDriver');
            break;
        case 'dingAnnotationValueDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\AnnotationValueDriver');
            break;
        case 'dingMvcAnnotationDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\MvcAnnotationDriver');
            break;
        case 'dingAnnotationRequiredDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\AnnotationRequiredDriver');
            break;
        case 'dingAnnotationDiscovererDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\AnnotationDiscovererDriver');
            $bean->setProperties(array(
                new BeanPropertyDefinition(
                	'cache', BeanPropertyDefinition::PROPERTY_BEAN,
                	'dingAnnotationsCache'
                )
            ));
            $bean->setInitMethod('parse');
            $bean->setArguments(array(
                new BeanConstructorArgumentDefinition(
                    BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_VALUE,
                    $this->options['bdef']['annotation']['scanDir']
                )
            ));
            break;
        case 'dingAnnotationResourceDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\AnnotationResourceDriver');
            break;
        case 'dingAnnotationInjectDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\AnnotationInjectDriver');
            break;
        case 'dingPropertiesDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\PropertiesDriver');
            break;
        case 'dingLifecycleManager':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Lifecycle\BeanLifecycleManager');
            break;
        case 'dingMethodInjectionDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\MethodInjectionDriver');
            break;
        case 'dingMessageSourceDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\MessageSourceDriver');
            break;
        case 'dingReflectionFactory':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Reflection\ReflectionFactory');
            $bean->setArguments(array(
                new BeanConstructorArgumentDefinition(
                    BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_VALUE,
                    isset($this->options['bdef']['annotation'])
                )
            ));
            $bean->setProperties(array(
                new BeanPropertyDefinition(
                	'cache', BeanPropertyDefinition::PROPERTY_BEAN,
                	'dingAnnotationsCache'
                ),
                new BeanPropertyDefinition(
                	'annotationParser', BeanPropertyDefinition::PROPERTY_BEAN,
                	'dingAnnotationParser'
                )
            ));
            break;
        case 'dingProxyFactory':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Aspect\Proxy');
            $bean->setProperties(array(
                new BeanPropertyDefinition(
                	'cache', BeanPropertyDefinition::PROPERTY_BEAN,
                	'dingProxyCache'
                )
            ));
            break;
        default:
            break;
        }
        return $bean;
    }
public function getBeanDefinition($name)
    {
        $bean = null;
        switch ($name)
        {
        case 'dingAnnotationParser':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Annotation\Parser');
            break;
        case 'dingAnnotationsCache':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Cache\Locator\CacheLocator');
            $bean->setFactoryMethod('getAnnotationsCacheInstance');
            break;
        case 'dingBeanCache':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Cache\Locator\CacheLocator');
            $bean->setFactoryMethod('getBeansCacheInstance');
            break;
        case 'dingDefinitionsCache':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Cache\Locator\CacheLocator');
            $bean->setFactoryMethod('getDefinitionsCacheInstance');
            break;
        case 'dingProxyCache':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Cache\Locator\CacheLocator');
            $bean->setFactoryMethod('getProxyCacheInstance');
            break;
        case 'dingAspectCache':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Cache\Locator\CacheLocator');
            $bean->setFactoryMethod('getAspectCacheInstance');
            break;
        case 'dingAspectManager':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Aspect\AspectManager');
            $bean->setProperties(array(
                new BeanPropertyDefinition(
                	'cache', BeanPropertyDefinition::PROPERTY_BEAN,
                	'dingAspectCache'
                )
            ));
            break;
        case 'dingXmlBeanDefinitionProvider':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Provider\Xml');
            $bean->setArguments(array(
                new BeanConstructorArgumentDefinition(
                    BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_VALUE,
                    $this->options['bdef']['xml']
                )
            ));
            break;
        case 'dingAnnotationBeanDefinitionProvider':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Provider\Annotation');
            $bean->setArguments(array(
                new BeanConstructorArgumentDefinition(
                    BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_VALUE,
                    $this->options['bdef']['annotation']
                )
            ));
            $bean->setInitMethod('init');
            $bean->setProperties(array(
                new BeanPropertyDefinition(
                	'cache', BeanPropertyDefinition::PROPERTY_BEAN,
                	'dingAnnotationsCache'
                )
            ));
            break;
        case 'dingYamlBeanDefinitionProvider':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Provider\Yaml');
            $bean->setArguments(array(
                new BeanConstructorArgumentDefinition(
                    BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_VALUE,
                    $this->options['bdef']['yaml']
                )
            ));
            break;
        case 'dingAspectCallDispatcher':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Aspect\Interceptor\DispatcherImpl');
            break;
        case 'dingAnnotationInitDestroyMethodDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\AnnotationInitDestroyMethodDriver');
            break;
        case 'dingAnnotationValueDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\AnnotationValueDriver');
            break;
        case 'dingMvcAnnotationDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\MvcAnnotationDriver');
            break;
        case 'dingAnnotationRequiredDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\AnnotationRequiredDriver');
            break;
        case 'dingAnnotationDiscovererDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\AnnotationDiscovererDriver');
            $bean->setProperties(array(
                new BeanPropertyDefinition(
                	'cache', BeanPropertyDefinition::PROPERTY_BEAN,
                	'dingAnnotationsCache'
                )
            ));
            $bean->setInitMethod('parse');
            $bean->setArguments(array(
                new BeanConstructorArgumentDefinition(
                    BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_VALUE,
                    $this->options['bdef']['annotation']['scanDir']
                )
            ));
            break;
        case 'dingAnnotationResourceDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\AnnotationResourceDriver');
            break;
        case 'dingAnnotationInjectDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\AnnotationInjectDriver');
            break;
        case 'dingPropertiesDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\PropertiesDriver');
            break;
        case 'dingLifecycleManager':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Lifecycle\BeanLifecycleManager');
            break;
        case 'dingMethodInjectionDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\MethodInjectionDriver');
            break;
        case 'dingMessageSourceDriver':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Bean\Factory\Driver\MessageSourceDriver');
            break;
        case 'dingReflectionFactory':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Reflection\ReflectionFactory');
            $bean->setArguments(array(
                new BeanConstructorArgumentDefinition(
                    BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_VALUE,
                    isset($this->options['bdef']['annotation'])
                )
            ));
            $bean->setProperties(array(
                new BeanPropertyDefinition(
                	'cache', BeanPropertyDefinition::PROPERTY_BEAN,
                	'dingAnnotationsCache'
                ),
                new BeanPropertyDefinition(
                	'annotationParser', BeanPropertyDefinition::PROPERTY_BEAN,
                	'dingAnnotationParser'
                )
            ));
            break;
        case 'dingProxyFactory':
            $bean = new BeanDefinition($name);
            $bean->setClass('\Ding\Aspect\Proxy');
            $bean->setProperties(array(
                new BeanPropertyDefinition(
                	'cache', BeanPropertyDefinition::PROPERTY_BEAN,
                	'dingProxyCache'
                )
            ));
            break;
        default:
            break;
        }
        return $bean;
    }
(non-PHPdoc)
@see Ding\Bean.IBeanDefinitionProvider::get()