- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 98
 
Open
Description
What about generating class stubs for enummeration simple types and adding enumeration values as constants to the class?
This would help in building the entities as possible values would be available from Code.
Validation of this values is a similar but different issue, though.
<xsd:simpleType name = "GenderType">
    <xsd:restriction base = "xsd:string">
      <xsd:enumeration value = "Male"/>
      <xsd:enumeration value = "Female"/>
    </xsd:restriction>
  </xsd:simpleType>
class GenderType {
    const MALE = 'Male';
    const FEMALE = 'Female';
}
Or even maybe add it to the owner class. This would mean a bit of redundancy but the relation from property to SimpleType would be more clear.
class Person {
    /** simpleType GenderType*/
    const GENDER_MALE = 'Male';
    const GENDER_FEMALE = 'Female';
     /**
     * @property string $gender
     */
    private $gender = null;
}
Metadata
Metadata
Assignees
Labels
No labels