Download the PHP package trebel/schematic without Composer

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

Schematic Protocol

The purpose of this library is to create a schema transfer protocol with the ability to export and import XML.

How does it work

The library helps us create new data types with strict validation and a defined structure.

Data types:

In current version, there are 4 data types: Field, List, Operator, Schema. Every created object is immutable, once created, you cannot change it.

Data type: Trebel\Schematic\Field

Fields are the smallest points of data types, the value of any "Field" must be primitive or we can see below can be Operator:

Data type: Trebel\Schematic\Schema

Schema data type is object-like type, each schema can contain Field, List, or other Schema data types.

Then we can create our first Schema object:

ID is required field for each Schema data type

Data type: Trebel\Schematic\Collection (List)

Collection Why not List? beacouse of list is reserved word in PHP

Lists are data types similar to arrays, and the only difference between a Schema and a List is that List can only handle one type, while Schema can handle any.

Data type: Trebel\Schematic\Operator

Operators are special types, not to define an element, but to modify it.

For example, suppose we have a schema Car with fields ID and Price, and in the case where we want to change the price to add or subtract existing price, we can create Increase operator inside Price

In this version, the operators only work on the Field and List data types. There are defined operators

Push (Trebel\Schematic\Operators\Push),
Pull (Trebel\Schematic\Operators\Pull)
for List data type

Increase (Trebel\Schematic\Operators\Increase)
for Field data type

But you can create your own data types as well.

To support any operator on a Field or List, you need to define all the operators within the types.

Export / Import

The main part of the library is the ability to export and import XML schemas using a specific protocol.

Export Schema

You can only import a schema, not a field, list, or operator.

Let's look at a specific example:

Outpout xml files could be:

File: /tmp/example/index.xml

File: /tmp/example/Car/33.xml

and the same for Car/31.xml

Another example:

output:

Import Schema

Concrete example:

Conclusion

For more information, check out the tutorials located in the folder


All versions of schematic with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
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 trebel/schematic contains the following files

Loading the files please wait ...