Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

where are the simpleType restrictions? #158

Open
caicob opened this issue Aug 21, 2023 · 0 comments
Open

where are the simpleType restrictions? #158

caicob opened this issue Aug 21, 2023 · 0 comments

Comments

@caicob
Copy link

caicob commented Aug 21, 2023

I even managed to generate the code from XSD, but the simple type xsd has restrictions for each type and these restrictions were not generated in the code. did I do something wrong?

for example:
XSD:
<xsd:simpleType name="tsEmail"> <xsd:restriction base="xsd:string"> <xsd:maxLength value="80" /> <xsd:minLength value="1" /> <xsd:whiteSpace value="collapse" /> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="tsTelefone"> <xsd:restriction base="xsd:string"> <xsd:maxLength value="11" /> <xsd:minLength value="1" /> <xsd:whiteSpace value="collapse" /> </xsd:restriction> </xsd:simpleType> <xsd:complexType name="tcContato"> <xsd:sequence> <xsd:element name="Telefone" type="tsTelefone" minOccurs="0" maxOccurs="1" /> <xsd:element name="Email" type="tsEmail" minOccurs="0" maxOccurs="1" /> </xsd:sequence> </xsd:complexType>

php:
`<?php

namespace ABRASF;

/**

  • Class representing TcContatoType

  • XSD Type: tcContato
    /
    class TcContatoType
    {
    /
    *

    • @var string $telefone
      */
      private $telefone = null;

    /**

    • @var string $email
      */
      private $email = null;

    /**

    • Gets as telefone
    • @return string
      */
      public function getTelefone()
      {
      return $this->telefone;
      }

    /**

    • Sets a new telefone
    • @param string $telefone
    • @return self
      */
      public function setTelefone($telefone)
      {
      $this->telefone = $telefone;
      return $this;
      }

    /**

    • Gets as email
    • @return string
      */
      public function getEmail()
      {
      return $this->email;
      }

    /**

    • Sets a new email
    • @param string $email
    • @return self
      */
      public function setEmail($email)
      {
      $this->email = $email;
      return $this;
      }
      }

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant