Download the PHP package warrickbayman/incus without Composer

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

Incus

Build Status Stable Latest Unstable Version Scrutinizer Code Quality License

SensioLabsInsight

Incus is an easy to use Mandrill webhooks processor. The Webhooks data sent by Mandrill can sometimes be a bit confusing, so Incus attempts to simplifies the matter.

MailChump?

So MailChimp pulled a fast one on us. I see what you did there. Sneaky. Anyway, since the continued development of this package would require a paid MailChimp account that I simply don't need, this is likely the end.

It really sucks. Mandrill is a great service, but MailChimp kinda ruined it for a lot of us.

So this is it. I'll leave it here for anyone who can still use it, but there won't be any bug fixes from my side.

Status

Incus is under development and although it works, and you can use it right away, it's far from perfect. Mandrill is a service I used constantly, so Incus will grow as I need to add features to it.

If you find bugs, please use the issue tracker here: Issue Tracker.

Please also be aware that the documentation is fairly incomplete as it is growing with the project. As I complete features, so I will write better documentation.

Sometimes my tests get away from me and I find myself writing tests for code I've written. But at least the tests exist, right. Anyway, it's not quite 100% covered, but I'm getting there.

Installation

Incus can be installed via Composer. Add the following to the require section of your composer.json file:

And run composer update.

If you feel like living on the edge, replace "~0.1" with "dev-master".

The Basics

Create a working POST route and write a controller to look something like:

The listen() method will respond to any POST request containing a mandrill_events property. Pass a closure with a parameter of type Listener to the listen() method. The Listener class provides a number of methods as event handlers.

The Listen method also returns an array of the recieved events so you can process them yourself if don't want to use the Incus event handlers.

Event Handlers

The following methods are provided by the Listener class. For each event found in the mandrill_events object, the appropriate event handler is fired once.

Each event handler recieves a function as a parameter, which in turn takes an instance of the Event class as a parameter. The Event class provides a number of methods for working with the actual Mandrill Event. The following methods are provided by the Event object.

->at()

The at property is the time when the event was fired as a Carbon instance, so you have all the Carbon functionality on it.

->indexed()

Whether or not the message has been indexed. The property will always return false if the ->raw->msg property is empty, or doesn't exist. Mandrill messages may not be indexed if an event occures soon after the message is delivered.

->message()

Grab the message from the event. This method returns an instance of the Message class.

->raw()

The raw property will return the Mandrill event as a json object as it was received from the webhook. Nothing return by this property is altered or processed.

->type()

Returns the type of event that occured. This is only really useful if you collect an array of events from the listen() method. The Listener class also provides a set of constants that you can use for comparrison.

Message

The Message object provides a whole bunch of information about the actual message. The basic ones include:

->id()          Returns the unique ID of the message.
->at()          Returns a Carbon instance for when the message was sent.
->to()          Returns the email address the message was sent to.
->from()        Returns the email address the message was sent from.
->subject()     Returns the subject of the message.
->state()       Returns the state of the message as a string.
->subAccount()  Returns the sub account used for the message.
->template()    Returns the name of the template used for the message.
->tags()        Returns an array of tags applied to the message.

For bounced messages, there is also a diag() method which returns a diagnosis message, and a bounceDescription() method which returns a short reason for the message bouncing.

There is also a metadata() method which returns an instance of the Metadata class. This class provides three methods: all(), has() and get().

If Mandrill has not index the message (which is possible if the message is very new, or older than 30 days), then the message() method will return null. To avoid any problems, it's advisable to check if the message has been indexed using the indexed() method detailed earlier.


All versions of incus with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
nesbot/carbon Version ~1.13
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 warrickbayman/incus contains the following files

Loading the files please wait ....