Download the PHP package multitheftauto/mtasa-php-sdk without Composer

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

MTA:SA PHP SDK

PHP Composer

You can access the MTA Web Interface from almost any programming language that can request web pages. PHP can do this very easily.

This SDK provides one function call that will allow you to call any exported script functions on any server that you have access to.

See the official wiki page for further information.

Installation

Prerequisites

This SDK requires PHP 7.4 or greater.

HTTPlug client abstraction

As this SDK uses HTTPlug, you will have to require some libraries for get it working. See "HTTPlug for library users" for more info.

Quick installation (Fixed from HTTPlug documentation)

:warning: Note: If you don't follow this requirement before require the SDK, composer will throw you an error.

Setup

The only supported installation method is via Composer. Run the following command to require this SDK in your project:

A simple example

There are three ways to call an MTA server's exported functions, as shown in the following example:

Development environment setup

Prerequisites:

First, we need to build the local docker image. To do this, run the following command:

$ docker-compose build

We will be using an alias for executing the development commands.

$ alias dcli='docker-compose -f docker-compose.cli.yml run --rm'

Install dependencies:

$ dcli composer install

Running tests

To run the project tests and validate the coding standards:

$ dcli composer test

To run all unit tests you can use:

$ dcli phpunit

To run specific unit test you can use --filter option:

$ dcli phpunit --filter=ClassName::MethodName

All versions of mtasa-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
ext-json Version *
php-http/client-implementation Version ^1.0
php-http/httplug Version ^2.3
psr/http-factory Version ^1.0
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 multitheftauto/mtasa-php-sdk contains the following files

Loading the files please wait ....