Download the PHP package goetas/xsd2php without Composer

On this page you can find all versions of the php package goetas/xsd2php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package xsd2php

xsd2php

This repository is DEPRECATED, please use goetas-webservices/xsd2php

Build Status Code Coverage Scrutinizer Code Quality

Convert XSD into PHP classes.

With goetas/xsd2php you can convert any XSD/WSDL definition into PHP classes.

XSD2PHP can also generate JMS Serializer compatible metadata that can be used to serialize/unserialize the object instances.

Installation

There is one recommended way to install xsd2php via Composer:

Usage

With this example we will convert OTA XSD definitions into PHP classes.

Suppose that you have allo XSD files in /home/my/ota.

Generate PHP classes

What about namespaces?

Where place the files?

What about custom types?

Use composer scripts to generate classes

Now you can build your classes with composer build.

Serialize / Unserialize

XSD2PHP can also generate for you JMS Serializer metadata that you can use to serialize/unserialize the generated PHP class instances.

What about namespaces?

Where place the files?

What about custom types?

Dealing with xsd:anyType or xsd:anySimpleType

If your XSD contains xsd:anyType or xsd:anySimpleType types you have to specify a handler for this.

When you generate the JMS metadata you have to specify a custom handler:

Now you have to create a custom serialization handler:

Naming Strategy

There are two types of naming strategies: short and long. The default is short, this naming strategy can however generate naming conflicts.

The long naming strategy will suffix elements with Element and types with Type.

An XSD for instance with a type named User, a type named UserType, a root element named User and UserElement, will only work when using the long naming strategy.

Note

The code in this project is provided under the MIT license. For professional support contact [email protected] or visit https://www.goetas.com


All versions of xsd2php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
symfony/console Version ^2.1|^3.0
symfony/yaml Version ^2.1|^3.0
goetas-webservices/xsd-reader Version ^0.1.2
doctrine/inflector Version ^1.0
zendframework/zend-code Version ~2.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package goetas/xsd2php contains the following files

Loading the files please wait ....