/** * Returns the name of the value as constant * @see WsdlToPhpModel::getCleanName() * @uses WsdlToPhpModel::getCleanName() * @uses WsdlToPhpModel::getName() * @uses WsdlToPhpModel::getOwner() * @uses WsdlToPhpStructValue::constantSuffix() * @uses WsdlToPhpStructValue::getIndex() * @uses WsdlToPhpStructValue::getOwner() * @uses WsdlToPhpGenerator::getOptionGenericConstantsNames() * @param bool $_keepMultipleUnderscores optional, allows to keep the multiple consecutive underscores * @return string */ public function getCleanName($_keepMultipleUnderscores = false) { if (WsdlToPhpGenerator::getOptionGenericConstantsNames() && is_numeric($this->getIndex()) && $this->getIndex() >= 0) { return 'ENUM_VALUE_' . $this->getIndex(); } else { $key = self::constantSuffix($this->getOwner()->getName(), parent::getCleanName($_keepMultipleUnderscores), $this->getIndex()); return 'VALUE_' . strtoupper(parent::getCleanName($_keepMultipleUnderscores)) . ($key ? '_' . $key : ''); } }