Download the PHP package wsdltophp/packagebase without Composer

On this page you can find all versions of the php package wsdltophp/packagebase. 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 packagebase

Package Base

Classes that are used by the classes generated by the PackageGenerator project to ease the SoapClient UX.

License Latest Stable Version TeamCity build status Scrutinizer Code Quality Code Coverage Total Downloads StyleCI SymfonyInsight

The goal is to provide generic and useful classes that are on top of the classes generated by the PackageGenerator project.

For example, it allows to easily loop through the array elements of a SOAP result object property, it allows to easily set HTTP and SOAP headers for a SOAP request and it allows to easily populate an object from its array state representation.

Main features

The interfaces

The defined interfaces must be used in order to be able to match the requirements for the PackageGenerator generated classes.

StructEnumInterface

Description

This interface must be used to define a new EnumType class.

What has to be implemented?

There is at least/most one method that must be implemented so it's pretty fast to implement it even if you don't see the goal of it:

If you do not want to implement this method, you can too create your own class that inherits from our AbstractStructEnumBase class.

StructInterface

Description

This interface must be used to define a new StructType class.

What has to be implemented?

There is at least/most one method that must be implemented so it's pretty fast to implement it even if you don't see the goal of it:

If you do not want to implement this method, you can too create your own class that inherits from our AbstractStructBase class.

StructArrayInterface

Description

This interface must be used to define a new ArrayType class. The goal is to provide utility methods around Array Structs defined by the Wsdl in order to ease the handling of its content. Therefore, this interface inherits from our Countable PHP interfaces

What has to be implemented?

The only method that must be implemented would be getAttributeName but be aware that it is implemented in every generated ArrayType class so no need to define it. It's just a reminder of what is available in ArrayType classes.

So, basically, you MUST at least override the methods declared by the PHP interfaces from which this interface inherits

If you do not want to implement all the methods, you can too create your own class that inherits from our AbstractStructArrayBase class.

SoapClientInterface

Description

This interface must be used to define a new SoapClient base class for any class generated by PackageGenerator.

Options

Here are the constants/options defined by this interface and their utility:

What has to be implemented?

Here are the methods that must be implemented and why:

If you do not want to implement all these methods, you can too create your own class that inherits from our AbstractSoapClientBase class.

The abstract classes

AbstractStructEnumBase

Description

This class is the base class for any class generated by PackageGenerator. It implements our StructEnumInterface interface. It defines two methods:

AbstractStructBase

Description

This class is the base class for any class generated by PackageGenerator. It implements our StructInterface interface. It defines five methods:

Usage

AbstractStructArrayBase

Description

This class is the base class for any class generated by PackageGenerator. It implements our StructArrayInterface interface.

Usage

As soon as you have an element that is an array of items such as:

AbstractSoapClientBase

Description

This class is the base class for any class generated by PackageGenerator. Its goal is to provide utility/handful methods by implementing our SoapClientInterface interface. It's basically a decorator design pattern as the class has the SoapClient object as a static property in order to be able to apply methods on it. It is a static property in order to have a singleton between multiple calls (allowing to send cookies automatically between calls). It can be reset by passing true as the second parameter.

Usage

Let's say you have this type of generate class:

You can do:

Then call any of these base methods:

You have additional methods such as:

Need improvements for these classes?

Feel free to make some pull requests. We'll study them and let you know when it can be integrated.

Testing

You can run the unit tests with the following command:

Testing using Docker

Thanks to the Docker image of phpfarm, tests can be run locally under any PHP version using the cli:

First of all, you need to create your container which you can do using docker-compose by running the below command line from the root directory of the project:

You then have a container named package_base in which you can run composer commands and php cli commands such as:

FAQ

If you have a question, feel free to create an issue.

License

The MIT License (MIT). Please see License File for more information.


All versions of packagebase with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-soap Version *
ext-dom Version *
ext-json Version *
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 wsdltophp/packagebase contains the following files

Loading the files please wait ....