Download the PHP package thomasvargiu/pami-module without Composer

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

PamiModule

A ZF module for PAMI library.

Build Status Code Coverage Scrutinizer Code Quality Dependency Status Latest Stable Version Total Downloads Latest Unstable Version License

Configuration

First, you should define connection and client options in your configuration. Client options are all optional.

Then you can retrieve two services from the service locator:

PamiModule Client

You can get the client from the service locator.

Methods

The original client (the connection) is injected into the , and the actions delegates the original client.

Mapped Actions:

PamiModule PAMI

Events

The client has an instance injected into it.
The following methods will trigger events with the same name of the method and and suffix:

The events have param in event and and params in event, allowing you to modify the action before it will be dispatched or to cache responses.

PAMI events

All PAMI events are forwarded to the event manager that will trigger an event ().
The name of the event will be (example: ).
Of course, you can acces to the original event to retrieve event data (see example below).
The event target is the client.

Example:

Multiple clients

You can retrieve clients with service names:

Multiple clients sharing the same connection

You can create another client with the same connection of another one:

Getting the original PAMI client

You can retrieve the original PAMI client in two ways:

From service locator:

From the client:

Available Listeners

There are listeners ready to be used.

ConnectionStatusListener

This listener takes care to maintain a connection status, and to call method when is required.
It can be useful when you share the client between some services, because you don't need to call methods without to know the connection status. You can call directly and methods and it will automatically calls if a connection is not already opened.
You can also use and methods at any point of your application, the listener takes care to open or close connection only if is really necessary.
In order to use this listener, you can't use the connection (the original client) directly, because the connection status is maintained listening the client events.

If you want to use the listener in multiple clients, you need to attach a new instance of it for every client.

You have to attach it to the client before to call any methods, so the best way is to use a delegator factory. This library provide a ready to use delegator factory:

Note: if you share some connection between clients, you must attach the same listener to the clients, so you need to create your custom DelegatorFactory.

CacheListener

You can use the CacheListener to cache results of some actions. The constructor require a cache storage instance and the action names that listener can cache response.


All versions of pami-module with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
ext-json Version *
marcelog/pami Version ^2.0.2
psr/event-dispatcher Version ^1.0
psr/simple-cache Version ^1.0
psr/container 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 thomasvargiu/pami-module contains the following files

Loading the files please wait ....