goetas/xsd2php

howto handle hyphens ?

Closed this issue · 1 comments

hi,
i have this piece of xsd

   <xs:element name="convert-to-reseller">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="filter" type="clientSelectionFilterType">
                            <xs:annotation>
                                <xs:documentation>Fliter resellers/clients</xs:documentation>
                            </xs:annotation>
                        </xs:element>
                        <xs:element name="reseller-plan-name" type="string" minOccurs="0"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>`

and get this code:

/**
     * Adds as convert-to-reseller
     *
     * @return self
     * @param
     * \macropage\sdks\plesk\ClientTypeRequestType\ConvertToResellerAnonymousType
     * $convert-to-reseller
     */
    public function addToConvertToReseller(\macropage\sdks\plesk\ClientTypeRequestType\ConvertToResellerAnonymousType $convert-to-reseller)
    {
        $this->convertToReseller[] = $convert-to-reseller;
        return $this;
    }

of course "$convert-to-reseller" is not a valid php variable....
is there any way howto handle this ? autoconvert ?

thanks for any help!

WOW, super cool, thanks for tha fast fix !!! ;-)) thumbs up