Download the PHP package sofe/infoapi without Composer

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

InfoAPI

Extensible templating for PocketMine plugins.

In a nutshell, InfoAPI provides a simple API to register placeholders between plugins. But it is more powerful than just that:

Developer guide: Templating

If you let users customize messages in a config, you can consider formatting the message with InfoAPI.

Pass the config message into InfoAPI:

Advanced: Continuous templating

You can create a template and watch for changes using the renderContinuous API:

Developer guide: Register mapping

A mapping converts one info to another, e.g. money converts a player to the amount of money in {player money}. You can register your own mappings so that your plugin as well as other plugins using InfoAPI can use this info in the template.

For example, to provide the money of an online player:

The source and return types must be a default or InfoAPI::addKind types.

Advanced: Register continuous mapping

You can additionally provide a watchChanges closure, which returns a traverser that yields a value when a change is detected. The pmevent library may help with building traversers from events:

Developer guide: Install InfoAPI

If you are not developing a plugin, you do not need to install InfoAPI yourself. Plugins should have included InfoAPI in their phar release.

InfoAPI v2 is a virion library using virion 3.1. Virion 3.1 uses composer to install libraries:

  1. Include the InfoAPI virion by adding sof3/infoapi in your composer.json:

    You can place this file next to your plugin.yml. Installing composer is recommended but not required.

  2. Build your plugin with the InfoAPI virion using pharynx. You can test it on a server using the custom start.cmd/start.sh provided by pharynx.

  3. Use the pharynx GitHub action to integrate with Poggit. Remember to gitignore your vendor directory so that you don't push it to GitHub.

User guide: Writing a template

InfoAPI replaces expressions inside {} with variables. For example, if a chat plugin provides two variables:

Color codes are default variables. Instead of writing §1 §b etc, you could also write:

You can get more detailed info for a variable. For example, to get the coordinates of a player player:

Writing { directly will cause error without a matching }. If you want to write a {/} that is not part of an expression, write twice instead:

This will become


All versions of infoapi with dependencies

PHP Build Version
Package Version
Requires pocketmine/pocketmine-mp Version ^5.0.0
sof3/await-generator Version ^3.6.1
sof3/pmevent Version ^0.0.2
sof3/zleep Version ^0.1.0
php Version ^8.1
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 sofe/infoapi contains the following files

Loading the files please wait ....