Download the PHP package phptars/tars2php without Composer

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

Instructions for using tars2php

Brief introduction

The main function of tars2php is to automatically generate the PHP code of client side and server side through the tars protocol file, which is used by everyone. (the server side is mainly framework code, and the actual business logic needs to be supplemented and implemented by itself)

Mapping of basic types

Here is our mapping of basic types:

When we need to identify specific variable types, we need to use these basic types, which are constants, from 1-14.

Mapping of complex types

There are some special packaging and unpacking mechanisms for vector, map and struct. Therefore, special data types need to be introduced:

Vector:

map:

struct:

How to use tars2php

If the user only uses packaging and unpacking requirements, the process is as follows:

  1. Prepare a tar protocol file, such as example.tar

  2. Write a tar.proto.php file, which is the configuration file used to generate code.

  3. exec php ./tars2php.php ./tars.proto.php

  4. The tool will automatically generate three-level directory structure according to the service name. In the demo, the phptest / PHP server / obj / directory will be generated under the. / server directory. The classes under the obj directory are the PHP objects corresponding to struct, and the tar directory is the tar protocol file itself.

For example, struct in example.tar:

转变成classes/SimpleStruct.php

  1. The interface section in example. Tar automatically generates a separate interface named PHP file.

For example, 'int testlofoftags (lotoftags tags, out lotoftags outbound);' the interface generation method is as follows

Part server

client part


All versions of tars2php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.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 phptars/tars2php contains the following files

Loading the files please wait ....