src/mg/Ding/Bean/Provider/Xml.php
private function _loadConstructorArg($simpleXmlArg)
    {
        if (isset($simpleXmlArg->ref)) {
            $argType = BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_BEAN;
            $argValue = (string)$simpleXmlArg->ref->attributes()->bean;
        } else if (isset($simpleXmlArg->bean)) {
            $argType = BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_BEAN;
            $name = BeanDefinition::generateName('Bean');
            $argValue = $name;
            $simpleXmlArg->bean->addAttribute('id', $name);
        } else if (isset($simpleXmlArg->null)) {
            $argType = BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_VALUE;
            $argValue = null;
        } else if (isset($simpleXmlArg->false)) {
            $argType = BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_VALUE;
            $argValue = false;
        } else if (isset($simpleXmlArg->true)) {
            $argType = BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_VALUE;
            $argValue = true;
        } else if (isset($simpleXmlArg->array)) {
            $argType = BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_ARRAY;
            $argValue = array();
            foreach ($simpleXmlArg->array->entry as $arrayEntry) {
                $key = (string)$arrayEntry->attributes()->key;
                $argValue[$key] = $this->_loadConstructorArg($arrayEntry);
            }
        } else if (isset($simpleXmlArg->eval)) {
            $argType = BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_CODE;
            $argValue = (string)$simpleXmlArg->eval;
        } else {
            $argType = BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_VALUE;
            $argValue = (string)$simpleXmlArg->value;
        }
        if (isset($simpleXmlArg->attributes()->name)) {
            $argName = (string)$simpleXmlArg->attributes()->name;
        } else {
            $argName = false;
        }
        return new BeanConstructorArgumentDefinition($argType, $argValue, $argName);
    }
private function _loadConstructorArg($simpleXmlArg)
    {
        if (isset($simpleXmlArg->ref)) {
            $argType = BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_BEAN;
            $argValue = (string)$simpleXmlArg->ref->attributes()->bean;
        } else if (isset($simpleXmlArg->bean)) {
            $argType = BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_BEAN;
            $name = BeanDefinition::generateName('Bean');
            $argValue = $name;
            $simpleXmlArg->bean->addAttribute('id', $name);
        } else if (isset($simpleXmlArg->null)) {
            $argType = BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_VALUE;
            $argValue = null;
        } else if (isset($simpleXmlArg->false)) {
            $argType = BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_VALUE;
            $argValue = false;
        } else if (isset($simpleXmlArg->true)) {
            $argType = BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_VALUE;
            $argValue = true;
        } else if (isset($simpleXmlArg->array)) {
            $argType = BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_ARRAY;
            $argValue = array();
            foreach ($simpleXmlArg->array->entry as $arrayEntry) {
                $key = (string)$arrayEntry->attributes()->key;
                $argValue[$key] = $this->_loadConstructorArg($arrayEntry);
            }
        } else if (isset($simpleXmlArg->eval)) {
            $argType = BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_CODE;
            $argValue = (string)$simpleXmlArg->eval;
        } else {
            $argType = BeanConstructorArgumentDefinition::BEAN_CONSTRUCTOR_VALUE;
            $argValue = (string)$simpleXmlArg->value;
        }
        if (isset($simpleXmlArg->attributes()->name)) {
            $argName = (string)$simpleXmlArg->attributes()->name;
        } else {
            $argName = false;
        }
        return new BeanConstructorArgumentDefinition($argType, $argValue, $argName);
    }
Returns a constructor argument definition.

@param SimpleXML $simpleXmlArg Argument node.

@throws BeanFactoryException
@return BeanConstructorArgumentDefinition