Download the PHP package feast/pusher without Composer

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

FEAST Framework

PHPUnit Psalm Static analysis codecov

PHP Version Packagist License Docs

FEAST Pusher Plugin

This package is a plug to work with Pusher for FEAST Framework

Installation

Usage

Installation

Recommended installation uses composer. This allows for quick setup.

Installing with Composer

Run composer install feast/pusher.

In container.php, add the following at the bottom of the file.

Manual installation

Alternatively, if you do not wish to use composer, this plugin can be manually installed by downloading and placed in a folder of your choosing if you do not wish to use composer. You will need to add a path mapping in container.php before adding Pusher to the container. Replace src in the block below with the path to your installation of the Pusher plugin.

Configuration and Usage

Configuration

The Pusher plugin is configured by adding an array into your configs/config.php that contains the necessary keys. See sample below. Note that if you name your configuration namespace pusher, then you do not need to pass it in to the various methods.

Injection and Instantiation

The Pusher plugin can be automatically injected into both controllers and plugin classes by type-hinting the argument \FeastFramework\Pusher\Pusher. To learn more about Dependency injection in FEAST, see the docs, here

Alternatively, you may directly instantiate by calling new Pusher();

Usage

The Pusher object has the following methods. All methods take various parameters as well as an optional configuration namespace. Methods return objects that represent the data from the pusher API. See the src/Response folder for details.

  1. getUsers - get user information for a channel
    1. Parameters
      1. channel
      2. pusherConfigNamespace - defaults to pusher
  2. event - Trigger a single event.
    1. Parameters
      1. name - The name of the event to trigger.
      2. data - An array or stdClass of data to pass to the event.
      3. channels - Either a single channel as a string, or an array of channels to publish to.
      4. socketId - Exclude the event from the given socket id if passed in. Defaults to null.
      5. info - An array of attributes which should be returned. Currently valid values are user_count and subscription_count.
      6. pusherConfigNamespace - defaults to pusher
  3. batchEvents - Trigger multiple events.
    1. Parameters
      1. eventData - See the Pusher docs for more info.
      2. pusherConfigNamespace - defaults to pusher
  4. channelInfo - Fetch information for a single channel.
    1. Parameters
      1. channel - Channel name to fetch information for
      2. infoType - An array of attributes to fetch. Valid options are user_count and subscription_count.
      3. pusherConfigNamespace - defaults to pusher
  5. channelsInfo - Fetch information for multiple channels
    1. Parameters
      1. prefix - Filter returned values by specified prefix. Defaults to null.
      2. infoType - An array of attributes to fetch. Valid option currently only user_count.
      3. pusherConfigNamespace - defaults to pusher

All versions of pusher with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0.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 feast/pusher contains the following files

Loading the files please wait ....