WsdlToPhp\PackageGenerator\Model\AbstractModel::getCleanName PHP Method

getCleanName() public method

Returns a valid clean name for PHP
public getCleanName ( boolean $keepMultipleUnderscores = true ) : string
$keepMultipleUnderscores boolean optional, allows to keep the multiple consecutive underscores
return string
    public function getCleanName($keepMultipleUnderscores = true)
    {
        return self::cleanString($this->getName(), $keepMultipleUnderscores);
    }

Usage Example

示例#1
0
 /**
  * Returns the name of the value as constant
  * @see AbstractModel::getCleanName()
  * @uses AbstractModel::getCleanName()
  * @uses AbstractModel::getName()
  * @uses AbstractModel::getOwner()
  * @uses StructValue::constantSuffix()
  * @uses StructValue::getIndex()
  * @uses StructValue::getOwner()
  * @uses Generator::getOptionGenericConstantsNames()
  * @param bool $keepMultipleUnderscores optional, allows to keep the multiple consecutive underscores
  * @return string
  */
 public function getCleanName($keepMultipleUnderscores = false)
 {
     if ($this->getGenerator()->getOptionGenericConstantsNames()) {
         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 : '');
     }
 }
All Usage Examples Of WsdlToPhp\PackageGenerator\Model\AbstractModel::getCleanName